updated version

This commit is contained in:
Tom Schimansky 2021-09-14 14:48:17 +02:00
parent ac0aa465d4
commit 3deeb2a1b6
4 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
__version__ = "1.1" __version__ = "1.2"
from .customtkinter_button import CTkButton from .customtkinter_button import CTkButton
from .customtkinter_slider import CTkSlider from .customtkinter_slider import CTkSlider

View File

@ -58,7 +58,7 @@ class SystemAppearanceModeListener(Thread):
sleep(0.5) sleep(0.5)
class SystemAppearanceModeListenerNoThread(): class SystemAppearanceModeListenerNoThread:
def __init__(self, callback): def __init__(self, callback):
self.appearance_mode = self.detect_appearance_mode() self.appearance_mode = self.detect_appearance_mode()
self.callback_function = callback self.callback_function = callback

View File

@ -298,7 +298,7 @@ class CTkButton(tkinter.Frame):
def set_text(self, text): def set_text(self, text):
self.text = text self.text = text
if self.text_label is not None: 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: else:
sys.stderr.write("ERROR (CTkButton): Cant change text because button has no text.") sys.stderr.write("ERROR (CTkButton): Cant change text because button has no text.")

View File

@ -38,6 +38,7 @@ class CTkSlider(tkinter.Frame):
self.fg_color = fg_color self.fg_color = fg_color
self.button_color = self.bg_color if button_color is None else button_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.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.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark"
self.width = width self.width = width