summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hvaal <harald.hvaal@gmail.com>2015-03-28 20:14:01 +0100
committerHarald Hvaal <harald.hvaal@gmail.com>2015-04-20 09:45:22 +0000
commit58f9d467c22f7333f8a4e9f726655882c9c331a0 (patch)
tree6eb1c4a72cf1532a03f596e80fa2207fce047686
parent13aad0cf03170cde6dd147f9d2ce460bac98d712 (diff)
downloadqtquickcontrols-58f9d467c22f7333f8a4e9f726655882c9c331a0.tar.gz
Do not override QGuiApplication::palette() if set
If the users explicitly sets a global palette, this should be used instead of the one provided by platformTheme. Task-number: QTBUG-39800 Change-Id: I380fac088c53f48773600e3c78a35a074a970069 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
-rw-r--r--src/controls/Private/qquickstyleitem.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp
index ea769661..5ddeee16 100644
--- a/src/controls/Private/qquickstyleitem.cpp
+++ b/src/controls/Private/qquickstyleitem.cpp
@@ -815,6 +815,9 @@ void QQuickStyleItem::initStyleOption()
void QQuickStyleItem::resolvePalette()
{
+ if (QCoreApplication::testAttribute(Qt::AA_SetPalette))
+ return;
+
QPlatformTheme::Palette paletteType = QPlatformTheme::SystemPalette;
switch (m_itemType) {
case Button: