aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/fusion
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/fusion')
-rw-r--r--src/imports/controls/fusion/qquickfusiontheme.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/imports/controls/fusion/qquickfusiontheme.cpp b/src/imports/controls/fusion/qquickfusiontheme.cpp
index ac88563a..107619bf 100644
--- a/src/imports/controls/fusion/qquickfusiontheme.cpp
+++ b/src/imports/controls/fusion/qquickfusiontheme.cpp
@@ -37,12 +37,16 @@
#include "qquickfusiontheme_p.h"
#include <QtQuickTemplates2/private/qquicktheme_p.h>
+#include <QtQuickControls2/private/qquickstyle_p.h>
QT_BEGIN_NAMESPACE
void QQuickFusionTheme::initialize(QQuickTheme *theme)
{
- Q_UNUSED(theme);
+ const bool isDarkSystemTheme = QQuickStylePrivate::isDarkSystemTheme();
+ QPalette systemPalette;
+ systemPalette.setColor(QPalette::ButtonText, isDarkSystemTheme ? Qt::white : Qt::black);
+ theme->setPalette(QQuickTheme::System, systemPalette);
}
QT_END_NAMESPACE