dark-blue, green theme in .json, new font .otf file for circles

This commit is contained in:
TomSchimansky
2022-03-02 00:53:58 +01:00
parent ecd4881ffb
commit 9ed461e04c
15 changed files with 238 additions and 98 deletions

View File

@@ -0,0 +1,29 @@
import customtkinter
import tkinter
customtkinter.set_appearance_mode("light")
customtkinter.set_default_color_theme("dark-blue")
app = customtkinter.CTk()
app.geometry("400x300")
app.title("CTkDialog Test")
def change_mode():
if customtkinter.get_appearance_mode().lower() == "dark":
customtkinter.set_appearance_mode("light")
elif customtkinter.get_appearance_mode().lower() == "light":
customtkinter.set_appearance_mode("dark")
def button_click_event():
dialog = customtkinter.CTkDialog(master=None, text="Type in a number:", title="Test")
print("Number:", dialog.get_input())
button = customtkinter.CTkButton(app, text="Open Dialog", command=button_click_event)
button.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER)
c1 = customtkinter.CTkCheckBox(app, text="dark mode", command=change_mode)
c1.place(relx=0.5, rely=0.8, anchor=tkinter.CENTER)
app.mainloop()