qt: Make sure stylesheet updates of -debug-ui are activated (#3623)

This reverses force logic of `GUIUtil::loadTheme` to not force by default and instead forces it explicit in appearance widgets call.

Due to `fForce` beeing default the ui debug timer wasn't started properly because there was no call of `GUIUtil::loadStylesheet` without `fForce=true` which is a requirement to start the debug timer.
This commit is contained in:
dustinface 2020-07-27 09:32:48 +02:00 committed by GitHub
parent 0041a011ea
commit 7e10b8236d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -102,7 +102,8 @@ void AppearanceWidget::updateTheme(const QString& theme)
QString newValue = theme.isEmpty() ? ui->theme->currentData().toString() : theme; QString newValue = theme.isEmpty() ? ui->theme->currentData().toString() : theme;
if (GUIUtil::getActiveTheme() != newValue) { if (GUIUtil::getActiveTheme() != newValue) {
QSettings().setValue("theme", newValue); QSettings().setValue("theme", newValue);
GUIUtil::loadTheme(); // Force loading the theme
GUIUtil::loadTheme(nullptr, true);
} }
} }

View File

@ -351,7 +351,7 @@ namespace GUIUtil
bool dashThemeActive(); bool dashThemeActive();
/** Load the theme and update all UI elements according to the appearance settings. */ /** Load the theme and update all UI elements according to the appearance settings. */
void loadTheme(QWidget* widget = nullptr, bool fForce = true); void loadTheme(QWidget* widget = nullptr, bool fForce = false);
/** Disable the OS default focus rect for macOS because we have custom focus rects /** Disable the OS default focus rect for macOS because we have custom focus rects
* set in the css files */ * set in the css files */