summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-11-26 13:12:08 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-12-03 12:29:09 +0100
commitab6d645850e88f3e351d196bf009135b6189ba8a (patch)
treed3af29b4dab117faa7ccdc8aedb0cde1d2dbdcf5
parent457496b83090006b232c56c04042bf6c9b8b2c31 (diff)
Android: Fix broken system palette
When we overwrite the default palette, we have to make sure we don't overwrite default values with black for all the colors that are not retrieved from the json file. We would for instance get black as both the base color and text color which would make some components unusable. Change-Id: I1079a70a0ac7eb379ed5e8d92c6b39c2ea77ba49 Task-number: QTBUG-42812 Task-number: QTBUG-42998 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index f9f2e4a944..375096139d 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -278,7 +278,8 @@ static std::shared_ptr<AndroidStyle> loadAndroidStyle(QPalette *defaultPalette)
const int pt = paletteType(key);
if (pt > -1 || !qtClassName.isEmpty()) {
// Extract palette information
- QPalette palette;
+ QPalette palette = *defaultPalette;
+
attributeIterator = item.find(QLatin1String("defaultTextColorPrimary"));
if (attributeIterator != item.constEnd())
palette.setColor(QPalette::WindowText, QRgb(int(attributeIterator.value().toDouble())));