summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@nokia.com>2010-07-23 12:53:58 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-07-27 00:10:00 (GMT)
commita38bfb1807cb36240e0102935b23fe1ac474d035 (patch)
tree4702674ab981e6976140938a80d0952634d46222 /src/gui/widgets
parent18a2e097f09ecd68e9ea2a2a515d9358729188c2 (diff)
downloadQt-a38bfb1807cb36240e0102935b23fe1ac474d035.zip
Qt-a38bfb1807cb36240e0102935b23fe1ac474d035.tar.gz
Qt-a38bfb1807cb36240e0102935b23fe1ac474d035.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 (cherry picked from commit 24cdab32de2abd8669f281dd54c8da1124514915)
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 1bffde1..86e56bc 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1946,7 +1946,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);
}