summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2010-07-23 12:53:58 (GMT)
committerPierre Rossi <pierre.rossi@nokia.com>2010-07-23 13:41:28 (GMT)
commit24cdab32de2abd8669f281dd54c8da1124514915 (patch)
treea55d4dc2a0fd8a5570d11efb458cbf9a7a67f78c /src/gui/widgets
parent3124d14be27766ddf3c86528c913165e09317111 (diff)
downloadQt-24cdab32de2abd8669f281dd54c8da1124514915.zip
Qt-24cdab32de2abd8669f281dd54c8da1124514915.tar.gz
Qt-24cdab32de2abd8669f281dd54c8da1124514915.tar.bz2
Fix QLineEdit's Highlight color when inactive.
This commit also updates QPalette's documentation regarding the current ColorGroup and operator==. Task-number: QTBUG-697 Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlineedit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index d7311ef..981e934 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1949,7 +1949,8 @@ void QLineEdit::paintEvent(QPaintEvent *)
if (d->control->hasSelectedText() || (d->cursorVisible && !d->control->inputMask().isEmpty() && !d->control->isReadOnly())){
flags |= QLineControl::DrawSelections;
// Palette only used for selections/mask and may not be in sync
- if(d->control->palette() != pal)
+ if (d->control->palette() != pal
+ || d->control->palette().currentColorGroup() != pal.currentColorGroup())
d->control->setPalette(pal);
}