diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/controls/fusion/qquickfusiontheme.cpp | 5 | ||||
-rw-r--r-- | src/quicktemplates2/qquicktheme.cpp | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/imports/controls/fusion/qquickfusiontheme.cpp b/src/imports/controls/fusion/qquickfusiontheme.cpp index 107619bf..903758bb 100644 --- a/src/imports/controls/fusion/qquickfusiontheme.cpp +++ b/src/imports/controls/fusion/qquickfusiontheme.cpp @@ -45,7 +45,10 @@ void QQuickFusionTheme::initialize(QQuickTheme *theme) { const bool isDarkSystemTheme = QQuickStylePrivate::isDarkSystemTheme(); QPalette systemPalette; - systemPalette.setColor(QPalette::ButtonText, isDarkSystemTheme ? Qt::white : Qt::black); + systemPalette.setColor(QPalette::Active, QPalette::ButtonText, + isDarkSystemTheme ? QColor::fromRgb(0xe7e7e7) : QColor::fromRgb(0x252525)); + systemPalette.setColor(QPalette::Disabled, QPalette::ButtonText, + isDarkSystemTheme ? QColor::fromRgb(0x777777) : QColor::fromRgb(0xb6b6b6)); theme->setPalette(QQuickTheme::System, systemPalette); } diff --git a/src/quicktemplates2/qquicktheme.cpp b/src/quicktemplates2/qquicktheme.cpp index 1ea0cef2..af49ffc9 100644 --- a/src/quicktemplates2/qquicktheme.cpp +++ b/src/quicktemplates2/qquicktheme.cpp @@ -44,6 +44,18 @@ QT_BEGIN_NAMESPACE QScopedPointer<QQuickTheme> QQuickThemePrivate::instance; +static void cleanup_instance() +{ + QQuickThemePrivate::instance.reset(); +} + +static void install_instance_cleanuper() +{ + qAddPostRoutine(cleanup_instance); +} + +Q_COREAPP_STARTUP_FUNCTION(install_instance_cleanuper) + static QPlatformTheme::Font platformFont(QQuickTheme::Scope scope) { switch (scope) { |