티스토리 뷰

tomato.png
0.01MB

from tkinter import *
# ---------------------------- CONSTANTS ------------------------------- #
PINK = "#e2979c"
RED = "#e7305b"
GREEN = "#9bdeac"
YELLOW = "#f7f5dd"
FONT_NAME = "Courier"
WORK_MIN = 25
SHORT_BREAK_MIN = 5
LONG_BREAK_MIN = 20
# ---------------------------- TIMER RESET ------------------------------- # 
# ---------------------------- TIMER MECHANISM ------------------------------- # 
# ---------------------------- COUNTDOWN MECHANISM ------------------------------- # 
# ---------------------------- UI SETUP ------------------------------- #
window = Tk()
window.title("Pomodoro")
window.config(padx=100, pady=50, bg=YELLOW)
canvas = Canvas(width=200, height=224, bg=YELLOW, highlightthickness=0)
tomato_img = PhotoImage(file="tomato.png")
canvas.create_image(100,112,image=tomato_img)
canvas.create_text(102,128,text="00:00", fill="white",font=(FONT_NAME, 26, "bold"))
canvas.pack()
window.mainloop()

 

'Test > Python(20220101~)' 카테고리의 다른 글

Days28. Timer 계속 (tkinter)  (0) 2022.05.18
Days28. Timer 계속 (tkinter)  (0) 2022.05.14
Days27. Miles to Kilometers 프로젝트  (0) 2022.04.23
Days27. tkinter Layout Manager  (0) 2022.04.17
Days27. tkinter 계속  (0) 2022.04.09
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함