From 3deeb2a1b6574f4fbe4d6cb6acd66050e9bc7697 Mon Sep 17 00:00:00 2001 From: Tom Schimansky Date: Tue, 14 Sep 2021 14:48:17 +0200 Subject: [PATCH] updated version --- customtkinter/__init__.py | 2 +- customtkinter/appearance_mode_tracker.py | 2 +- customtkinter/customtkinter_button.py | 2 +- customtkinter/customtkinter_slider.py | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/customtkinter/__init__.py b/customtkinter/__init__.py index abae2e2..891807c 100644 --- a/customtkinter/__init__.py +++ b/customtkinter/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.1" +__version__ = "1.2" from .customtkinter_button import CTkButton from .customtkinter_slider import CTkSlider diff --git a/customtkinter/appearance_mode_tracker.py b/customtkinter/appearance_mode_tracker.py index 5598eb4..8dd1872 100644 --- a/customtkinter/appearance_mode_tracker.py +++ b/customtkinter/appearance_mode_tracker.py @@ -58,7 +58,7 @@ class SystemAppearanceModeListener(Thread): sleep(0.5) -class SystemAppearanceModeListenerNoThread(): +class SystemAppearanceModeListenerNoThread: def __init__(self, callback): self.appearance_mode = self.detect_appearance_mode() self.callback_function = callback diff --git a/customtkinter/customtkinter_button.py b/customtkinter/customtkinter_button.py index 45af9f2..d763710 100644 --- a/customtkinter/customtkinter_button.py +++ b/customtkinter/customtkinter_button.py @@ -298,7 +298,7 @@ class CTkButton(tkinter.Frame): def set_text(self, text): self.text = text if self.text_label is not None: - self.text_label.configure(text=self.text, width=len(self.text)) + self.text_label.configure(text=self.text) #, width=len(self.text)) else: sys.stderr.write("ERROR (CTkButton): Cant change text because button has no text.") diff --git a/customtkinter/customtkinter_slider.py b/customtkinter/customtkinter_slider.py index afe3be1..514cc90 100644 --- a/customtkinter/customtkinter_slider.py +++ b/customtkinter/customtkinter_slider.py @@ -38,6 +38,7 @@ class CTkSlider(tkinter.Frame): self.fg_color = fg_color self.button_color = self.bg_color if button_color is None else button_color self.button_hover_color = self.bg_color if button_hover_color is None else button_hover_color + self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" self.width = width