Update ctk_theme.py (#480)
This commit is contained in:
parent
17e37f9ca0
commit
7a886dff26
|
|
@ -31,13 +31,16 @@ FIRST_RUN_FRAME_PAD: Tuple[int, int] = (28, 24)
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class CtkTheme:
|
class CtkTheme:
|
||||||
tg_blue: str = "#3390ec"
|
tg_blue: tuple = ("#3390ec", "#3390ec")
|
||||||
tg_blue_hover: str = "#2b7cd4"
|
tg_blue_hover: tuple = ("#2b7cd4", "#2b7cd4")
|
||||||
bg: str = "#ffffff"
|
|
||||||
field_bg: str = "#f0f2f5"
|
bg: tuple = ("#ffffff", "#1e1e1e")
|
||||||
field_border: str = "#d6d9dc"
|
field_bg: tuple = ("#f0f2f5", "#2b2b2b")
|
||||||
text_primary: str = "#000000"
|
field_border: tuple = ("#d6d9dc", "#3a3a3a")
|
||||||
text_secondary: str = "#707579"
|
|
||||||
|
text_primary: tuple = ("#000000", "#ffffff")
|
||||||
|
text_secondary: tuple = ("#707579", "#aaaaaa")
|
||||||
|
|
||||||
ui_font_family: str = "Sans"
|
ui_font_family: str = "Sans"
|
||||||
mono_font_family: str = "Monospace"
|
mono_font_family: str = "Monospace"
|
||||||
|
|
||||||
|
|
@ -49,10 +52,9 @@ def ctk_theme_for_platform() -> CtkTheme:
|
||||||
|
|
||||||
|
|
||||||
def apply_ctk_appearance(ctk: Any) -> None:
|
def apply_ctk_appearance(ctk: Any) -> None:
|
||||||
ctk.set_appearance_mode("light")
|
ctk.set_appearance_mode("auto")
|
||||||
ctk.set_default_color_theme("blue")
|
ctk.set_default_color_theme("blue")
|
||||||
|
|
||||||
|
|
||||||
def center_ctk_geometry(root: Any, width: int, height: int) -> None:
|
def center_ctk_geometry(root: Any, width: int, height: int) -> None:
|
||||||
sw = root.winfo_screenwidth()
|
sw = root.winfo_screenwidth()
|
||||||
sh = root.winfo_screenheight()
|
sh = root.winfo_screenheight()
|
||||||
|
|
@ -103,4 +105,4 @@ def main_content_frame(
|
||||||
) -> Any:
|
) -> Any:
|
||||||
frame = ctk.CTkFrame(root, fg_color=theme.bg, corner_radius=0)
|
frame = ctk.CTkFrame(root, fg_color=theme.bg, corner_radius=0)
|
||||||
frame.pack(fill="both", expand=True, padx=padx, pady=pady)
|
frame.pack(fill="both", expand=True, padx=padx, pady=pady)
|
||||||
return frame
|
return frame
|
||||||
Loading…
Reference in New Issue