summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsstyle.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-11-04 11:41:31 +0100
committerOlivier Goffart <ogoffart@trolltech.com>2009-11-04 11:58:47 +0100
commite1a81c96790bee72ee4fbd2b0c4a7b48078c4ec1 (patch)
tree0a58eaca795605e57096a4667f8e22fbd0b66f9b /src/gui/styles/qwindowsstyle.cpp
parent2747f200ce27599af74f01cb629ec8930bae7b44 (diff)
Fixes StyleSheets: Incorrect display of custom style to QComboBox
Two problem: - When QWindowsStyle draw CC_ComboBox, it does not save/restor the painter, whilt it does modify the pen and the brush. - QStyleSheetStyle CE_ComboBoxLabel did not specify the palette role to paint the text with, leaving the one from the palette Task-number: QTBUG-3974 Reviewed-by: Gabriel
Diffstat (limited to 'src/gui/styles/qwindowsstyle.cpp')
-rw-r--r--src/gui/styles/qwindowsstyle.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 5cf738e536..abce4d2c2e 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -2994,6 +2994,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
#ifndef QT_NO_COMBOBOX
case CC_ComboBox:
if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
+ p->save();
QBrush editBrush = cmb->palette.brush(QPalette::Base);
if ((cmb->subControls & SC_ComboBoxFrame)) {
if (cmb->frame) {
@@ -3063,6 +3064,7 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
proxy()->drawPrimitive(PE_FrameFocusRect, &focus, p, widget);
}
}
+ p->restore();
}
break;
#endif // QT_NO_COMBOBOX