Skip to content

Commit

Permalink
Fix example for Windows dark mode title bar (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyraik authored Jul 31, 2024
1 parent 3bb841c commit 6267a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def apply_theme_to_titlebar(root):
# Set the title bar color to the background color on Windows 11 for better appearance
pywinstyles.change_header_color(root, "#1c1c1c" if sv_ttk.get_theme() == "dark" else "#fafafa")
elif version.major == 10:
pywinstyles.apply_style(root, "dark" sv_ttk.get_theme() == "dark" else "normal")
pywinstyles.apply_style(root, "dark" if sv_ttk.get_theme() == "dark" else "normal")

# A hacky way to update the title bar's color on Windows 10 (it doesn't update instantly like on Windows 11)
root.wm_attributes("-alpha", 0.99)
Expand Down

0 comments on commit 6267a40

Please sign in to comment.