From 60833a44446206b2831366acb0f223c90373cca4 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Mon, 20 Jul 2020 01:57:35 +0200 Subject: [PATCH] qt: Make sure stylesheet updates of -debug-ui are activated 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 59c3e782b869..4fe3ae5fcfef 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 a21d317ff76a..1784f77f8a1f 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 */