From 9124314e9780a5f5fae964f9c233a77f3ed782a0 Mon Sep 17 00:00:00 2001 From: Tom Schimansky Date: Tue, 28 Dec 2021 18:26:29 +0100 Subject: [PATCH] small example modifications --- customtkinter/customtkinter_slider.py | 2 +- examples/example_background_image.py | 2 +- examples/simple_example.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/customtkinter/customtkinter_slider.py b/customtkinter/customtkinter_slider.py index 60a0356..59ffdaa 100644 --- a/customtkinter/customtkinter_slider.py +++ b/customtkinter/customtkinter_slider.py @@ -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: diff --git a/examples/example_background_image.py b/examples/example_background_image.py index f7ffcd7..7b58131 100644 --- a/examples/example_background_image.py +++ b/examples/example_background_image.py @@ -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__)) diff --git a/examples/simple_example.py b/examples/simple_example.py index 3243627..cbeba12 100644 --- a/examples/simple_example.py +++ b/examples/simple_example.py @@ -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)