diff options
author | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-09-28 10:56:35 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-09-28 10:56:35 (GMT) |
commit | aef084fc06e325c9b206c274d5b297660b7c671f (patch) | |
tree | e415161d5200d2eee7a098c8f5e411a486178a47 /src/gui/styles/qplastiquestyle.cpp | |
parent | ae5f7005c709165f847445aca746b5b338341121 (diff) | |
download | Qt-aef084fc06e325c9b206c274d5b297660b7c671f.zip Qt-aef084fc06e325c9b206c274d5b297660b7c671f.tar.gz Qt-aef084fc06e325c9b206c274d5b297660b7c671f.tar.bz2 |
Fix a color propagation issue with Combobox line edit
Some pixmap based themes were affected by this issue since they
needed to resolve the palette against the widget and the lineedit
palette was already resolved. We now set the palette on the lineedit
when you modify the parent palette. You can still maintain a separate
palette on the lineedit, but you have to set it after the parent has
been set. We can remove some workarounds for plastique and vista style
due to this.
Task-number: QTBUG-5950
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/styles/qplastiquestyle.cpp')
-rw-r--r-- | src/gui/styles/qplastiquestyle.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp index 4690a71..8772294 100644 --- a/src/gui/styles/qplastiquestyle.cpp +++ b/src/gui/styles/qplastiquestyle.cpp @@ -1362,11 +1362,8 @@ void QPlastiqueStyle::drawPrimitive(PrimitiveElement element, const QStyleOption if (const QStyleOptionFrame *lineEdit = qstyleoption_cast<const QStyleOptionFrame *>(option)) { // Panel of a line edit inside combo box or spin box is drawn in CC_ComboBox and CC_SpinBox if (widget) { -#ifndef QT_NO_COMBOBOX - if (qobject_cast<const QComboBox *>(widget->parentWidget())) - break; -#endif #ifndef QT_NO_SPINBOX + // Spinbox doesn't need a separate palette for the lineedit if (qobject_cast<const QAbstractSpinBox *>(widget->parentWidget())) break; #endif |