mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
Added .cget() methods to all widgets and changed text_font to font for all widgets
This commit is contained in:
@ -18,12 +18,13 @@ class CTkInputDialog:
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
master: any = None,
|
||||
title: str = "CTkDialog",
|
||||
text: str = "CTkDialog",
|
||||
fg_color: Union[str, Tuple[str, str]] = "default_theme",
|
||||
hover_color: Union[str, Tuple[str, str]] = "default_theme",
|
||||
border_color: Union[str, Tuple[str, str]] = "default_theme"):
|
||||
border_color: Union[str, Tuple[str, str]] = "default_theme",
|
||||
|
||||
master: any = None,
|
||||
title: str = "CTkDialog",
|
||||
text: str = "CTkDialog"):
|
||||
|
||||
self._appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark"
|
||||
self.master = master
|
||||
|
@ -263,6 +263,12 @@ class CTk(tkinter.Tk):
|
||||
|
||||
super().configure(*args, **kwargs)
|
||||
|
||||
def cget(self, attribute_name: str) -> any:
|
||||
if attribute_name == "fg_color":
|
||||
return self._fg_color
|
||||
else:
|
||||
return super().cget(attribute_name)
|
||||
|
||||
@staticmethod
|
||||
def _enable_macos_dark_title_bar():
|
||||
if sys.platform == "darwin" and not Settings.deactivate_macos_window_header_manipulation: # macOS
|
||||
|
@ -227,6 +227,12 @@ class CTkToplevel(tkinter.Toplevel):
|
||||
|
||||
super().configure(*args, **kwargs)
|
||||
|
||||
def cget(self, attribute_name: str) -> any:
|
||||
if attribute_name == "fg_color":
|
||||
return self._fg_color
|
||||
else:
|
||||
return super().cget(attribute_name)
|
||||
|
||||
@staticmethod
|
||||
def _enable_macos_dark_title_bar():
|
||||
if sys.platform == "darwin" and not Settings.deactivate_macos_window_header_manipulation: # macOS
|
||||
|
Reference in New Issue
Block a user