mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
small example modifications
This commit is contained in:
parent
9109663848
commit
9124314e97
@ -86,7 +86,7 @@ class CTkSlider(tkinter.Frame):
|
||||
def draw(self, no_color_updates=False):
|
||||
|
||||
# decide the drawing method
|
||||
if sys.platform == "darwin":
|
||||
if sys.platform == "darwin" and 1==2:
|
||||
# on macOS draw button with polygons (positions are more accurate, macOS has Antialiasing)
|
||||
self.draw_with_polygon_shapes()
|
||||
else:
|
||||
|
@ -4,7 +4,7 @@ import customtkinter
|
||||
from PIL import Image, ImageTk
|
||||
import os
|
||||
|
||||
customtkinter.set_appearance_mode("System") # Other: "Light", "Dark"
|
||||
customtkinter.set_appearance_mode("Dark") # Other: "Light", "System"
|
||||
|
||||
PATH = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
@ -3,7 +3,6 @@ import customtkinter # <- import the CustomTkinter module
|
||||
|
||||
customtkinter.enable_macos_darkmode()
|
||||
customtkinter.set_appearance_mode("System") # Other: "Dark", "Light"
|
||||
# customtkinter.set_theme_color(("red2", "red3"), ("red3", "red4"))
|
||||
|
||||
root_tk = tkinter.Tk() # create the Tk window like you normally do
|
||||
root_tk.geometry("400x300")
|
||||
@ -35,7 +34,7 @@ button_1 = customtkinter.CTkButton(master=frame_1, corner_radius=10, command=but
|
||||
button_1.place(relx=0.5, rely=0.4, anchor=tkinter.CENTER)
|
||||
# button_1.configure(state="disabled")
|
||||
|
||||
slider_1 = customtkinter.CTkSlider(master=frame_1, command=slider_function, from_=0, to=1, progress_color=("gray65", "gray40"))
|
||||
slider_1 = customtkinter.CTkSlider(master=frame_1, command=slider_function, from_=0, to=1)
|
||||
slider_1.place(relx=0.5, rely=0.55, anchor=tkinter.CENTER)
|
||||
slider_1.set(1.5)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user