From 7c2fd9cc488d463826d8e2fc9ff454e5145d0a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 8 May 2026 11:37:03 +0200 Subject: [PATCH] Only repolish visible widgets. Took 5 minutes --- cockatrice/src/interface/theme_manager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/interface/theme_manager.cpp b/cockatrice/src/interface/theme_manager.cpp index 4be4fc307..c7f259ec0 100644 --- a/cockatrice/src/interface/theme_manager.cpp +++ b/cockatrice/src/interface/theme_manager.cpp @@ -410,10 +410,12 @@ void ThemeManager::themeChangedSlot() // palette (WA_SetPalette not set). Calling it unconditionally would clobber // intentional per-widget palette customisations across the whole app. for (QWidget *widget : qApp->allWidgets()) { - newStyle->unpolish(widget); - newStyle->polish(widget); + if (widget->isVisible()) { + newStyle->unpolish(widget); + newStyle->polish(widget); - widget->update(); + widget->update(); + } } if (dirPath.isEmpty()) {