diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-16 03:01:17 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-16 03:01:17 +0100 |
commit | 3b467b5c5b34795fc4dfcd9cb8822aa3a3d8cf1c (patch) | |
tree | f8f1d9f3609595e771e4fd05048a7fa53b59e6f7 /src | |
parent | 7b48bda18f836671cda6d47d6570fc522a4361ec (diff) | |
parent | 0614d792967b7721c692cb273bb5428544fa3680 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I0d52818c7b221a6434acc6c960090a13d3d9febe
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) { |