summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Pejcoch <martin.pejcoch@nokia.com>2011-01-13 17:08:44 (GMT)
committerMartin Pejcoch <martin.pejcoch@nokia.com>2011-01-18 10:18:04 (GMT)
commitc6e447fefb99c569d22e7c34181d30ce62ffe2bf (patch)
tree19422e4eed66fbe5278a12a3eaacd21f61ac9273 /src
parent46ba213883cf46871ef539ef4d2304064b671175 (diff)
downloadQt-c6e447fefb99c569d22e7c34181d30ce62ffe2bf.zip
Qt-c6e447fefb99c569d22e7c34181d30ce62ffe2bf.tar.gz
Qt-c6e447fefb99c569d22e7c34181d30ce62ffe2bf.tar.bz2
Fixes color property of QComboBox stylesheet
Now the foreground color is displayed correctly when padding is set. Reviewed-by: Olivier
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 1b13d8c..4b591e2 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -3701,7 +3701,9 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
editRect.translate(cb->iconSize.width() + spacing, 0);
}
if (!cb->currentText.isEmpty() && !cb->editable) {
- drawItemText(p, editRect.adjusted(0, 0, 0, 0), Qt::AlignLeft | Qt::AlignVCenter, cb->palette,
+ QPalette styledPalette(cb->palette);
+ rule.configurePalette(&styledPalette, QPalette::Text, QPalette::Base);
+ drawItemText(p, editRect.adjusted(0, 0, 0, 0), Qt::AlignLeft | Qt::AlignVCenter, styledPalette,
cb->state & State_Enabled, cb->currentText, QPalette::Text);
}
p->restore();