summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2011-04-07 12:43:06 (GMT)
committerSami Merila <sami.merila@nokia.com>2011-04-07 12:43:06 (GMT)
commite81ef9c4744a759783af03ddb01508386b5f33cd (patch)
tree0f0499a1d4d18435467545332f8d5a2f0fda7611 /src/gui
parent8e14e026cfba15cb6e07044922532fbb0bed767c (diff)
downloadQt-e81ef9c4744a759783af03ddb01508386b5f33cd.zip
Qt-e81ef9c4744a759783af03ddb01508386b5f33cd.tar.gz
Qt-e81ef9c4744a759783af03ddb01508386b5f33cd.tar.bz2
Labels are not visible in dialogs with all themes
QS60Style uses different theme background for dialogs. However, labels use just one color irregardless of background texture. Therefore, in certain themes, this might produce an issue, where foreground color (label) is not visible from background. To fix this, set the label color to correct theme color when label is contained within a dialog. Task-number: QT-4559 Reviewed-by: Tomi Vihria
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qs60style.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 05243a7..879d2e8 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -683,6 +683,13 @@ void QS60StylePrivate::setThemePalette(QWidget *widget)
if (header->viewport())
header->viewport()->setPalette(widgetPalette);
QApplication::setPalette(widgetPalette, "QHeaderView");
+ } else if (qobject_cast<QLabel *>(widget)) {
+ if (widget->window() && widget->window()->windowType() == Qt::Dialog) {
+ QPalette widgetPalette = widget->palette();
+ widgetPalette.setColor(QPalette::WindowText,
+ s60Color(QS60StyleEnums::CL_QsnTextColors, 19, 0));
+ widget->setPalette(widgetPalette);
+ }
}
}