Skip to content

Commit 4907a90

Browse files
committed
Fix Qt widget style changes not applying in 2.1.57+
Should fix #24
1 parent 6c08bf6 commit 4907a90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/addon/colors.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ def recolor_python() -> None:
2222
replace_color(color_entries, color_name)
2323
replace_color(color_entries, "BUTTON_GRADIENT_START", "BUTTON_HOVER")
2424
replace_color(color_entries, "BUTTON_GRADIENT_END", "BUTTON_HOVER")
25-
theme_manager.apply_style()
25+
# theme_manager.apply_style() doesn't have an effect in 2.1.57+ if the theme and widget style didn't change,
26+
# so we call the private functions directly
27+
theme_manager._apply_palette(aqt.mw.app)
28+
theme_manager._apply_style(aqt.mw.app)
2629
_apply_style()
2730

2831

0 commit comments

Comments
 (0)