Refine dashboard overview readability

This commit is contained in:
Your Name committed 2026-06-18 17:12:47 +08:00
1 parent c557ce0dfb
commit 00821d0926
5 files changed
+74 -73

No files matched your search

+11 -10
View File
@@ -30,11 +30,12 @@ RADIUS_SM = 8
RADIUS_MD = 12
RADIUS_LG = 16
FONT_UI = ("Microsoft YaHei UI", 9)
FONT_SMALL = ("Microsoft YaHei UI", 8)
FONT_TITLE = ("Microsoft YaHei UI", 14, "bold")
FONT_H2 = ("Microsoft YaHei UI", 10, "bold")
FONT_MONO = ("Consolas", 8)
FONT_UI = ("Microsoft YaHei UI", 12)
FONT_SMALL = ("Microsoft YaHei UI", 11)
FONT_READ = ("Microsoft YaHei UI", 13)
FONT_TITLE = ("Microsoft YaHei UI", 18, "bold")
FONT_H2 = ("Microsoft YaHei UI", 14, "bold")
FONT_MONO = ("Consolas", 13)
def setup_styles(root) -> None:
@@ -54,7 +55,7 @@ def setup_styles(root) -> None:
style.configure("Muted.TLabel", background=SURFACE, foreground=MUTED, font=FONT_SMALL)
style.configure("Title.TLabel", background=BG, foreground=TEXT, font=FONT_TITLE)
style.configure("H2.TLabel", background=SURFACE, foreground=TEXT, font=FONT_H2)
style.configure("Value.TLabel", background=SURFACE, foreground=TEXT, font=("Microsoft YaHei UI", 17, "bold"))
style.configure("Value.TLabel", background=SURFACE, foreground=TEXT, font=("Microsoft YaHei UI", 22, "bold"))
style.configure("Small.TLabel", background=SURFACE, foreground=MUTED, font=FONT_SMALL)
style.configure("Sidebar.TButton", padding=(12, 8), anchor="w")
style.configure("Primary.TButton", padding=(14, 8), foreground="#ffffff", background=TEAL, borderwidth=0)
@@ -62,11 +63,11 @@ def setup_styles(root) -> None:
style.configure("Danger.TButton", padding=(14, 8), foreground=RED)
style.configure("Soft.TButton", padding=(12, 7))
style.configure("Dashboard.TNotebook", background=BG, borderwidth=0)
style.configure("Dashboard.TNotebook.Tab", padding=(14, 8), font=FONT_SMALL)
style.configure("Dashboard.TNotebook.Tab", padding=(16, 9), font=FONT_SMALL)
style.configure(
"Treeview",
font=("Microsoft YaHei UI", 8),
rowheight=23,
font=("Microsoft YaHei UI", 13),
rowheight=38,
background=SURFACE,
fieldbackground=SURFACE,
borderwidth=0,
@@ -75,7 +76,7 @@ def setup_styles(root) -> None:
style.map("Treeview", background=[("selected", TEAL_SOFT)], foreground=[("selected", TEXT)])
style.configure(
"Treeview.Heading",
font=("Microsoft YaHei UI", 8, "bold"),
font=("Microsoft YaHei UI", 12, "bold"),
background="#eef2eb",
foreground=TEXT,
relief="flat",