diff options
Diffstat (limited to 'qt-ui/groupedlineedit.cpp')
-rw-r--r-- | qt-ui/groupedlineedit.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/groupedlineedit.cpp b/qt-ui/groupedlineedit.cpp index 72eb59d41..915e4688b 100644 --- a/qt-ui/groupedlineedit.cpp +++ b/qt-ui/groupedlineedit.cpp @@ -207,7 +207,12 @@ void GroupedLineEdit::paintEvent(QPaintEvent *e) i.toFront(); path.addRoundedRect(rectangle, 5.0, 5.0); painter.setPen(i.peekNext()); - painter.setBrush(i.next().lighter(180)); + if (palette().color(QPalette::Text).lightnessF() <= 0.3 ) + painter.setBrush(i.next().lighter()); + else if (palette().color(QPalette::Text).lightnessF() <= 0.6 ) + painter.setBrush(i.next()); + else + painter.setBrush(i.next().darker()); painter.drawPath(path); } #endif |