From 6267a40be00f732016c53a9985e2ac125e984244 Mon Sep 17 00:00:00 2001 From: simon karrer <42744062+lyraik@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:29:00 +0200 Subject: [PATCH] Fix example for Windows dark mode title bar (#146) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cba750f..630503c 100644 --- a/README.md +++ b/README.md @@ -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)