Only repolish visible widgets.

Took 5 minutes
This commit is contained in:
Lukas Brübach 2026-05-08 11:37:03 +02:00
parent 616c79d6d9
commit 7c2fd9cc48

View file

@ -410,11 +410,13 @@ void ThemeManager::themeChangedSlot()
// palette (WA_SetPalette not set). Calling it unconditionally would clobber // palette (WA_SetPalette not set). Calling it unconditionally would clobber
// intentional per-widget palette customisations across the whole app. // intentional per-widget palette customisations across the whole app.
for (QWidget *widget : qApp->allWidgets()) { for (QWidget *widget : qApp->allWidgets()) {
if (widget->isVisible()) {
newStyle->unpolish(widget); newStyle->unpolish(widget);
newStyle->polish(widget); newStyle->polish(widget);
widget->update(); widget->update();
} }
}
if (dirPath.isEmpty()) { if (dirPath.isEmpty()) {
// set default values // set default values