From 7e10b8236db28210bc666222efa3e672a40bdddc Mon Sep 17 00:00:00 2001 From: dustinface <35775977+xdustinface@users.noreply.github.com> Date: Mon, 27 Jul 2020 09:32:48 +0200 Subject: [PATCH] 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. --- src/qt/appearancewidget.cpp | 3 ++- src/qt/guiutil.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qt/appearancewidget.cpp b/src/qt/appearancewidget.cpp index 59c3e782b8..4fe3ae5fcf 100644 --- a/src/qt/appearancewidget.cpp +++ b/src/qt/appearancewidget.cpp @@ -102,7 +102,8 @@ void AppearanceWidget::updateTheme(const QString& theme) QString newValue = theme.isEmpty() ? ui->theme->currentData().toString() : theme; if (GUIUtil::getActiveTheme() != newValue) { QSettings().setValue("theme", newValue); - GUIUtil::loadTheme(); + // Force loading the theme + GUIUtil::loadTheme(nullptr, true); } } diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index a21d317ff7..1784f77f8a 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -351,7 +351,7 @@ namespace GUIUtil bool dashThemeActive(); /** 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 * set in the css files */