forked from qt-creator/qt-creator
Use the theme background color for panel line edits
Previously, the image used as background forced it to be white, which made the text impossible to read when the palette foreground color happened to be white as well. Task-number: 258167
This commit is contained in:
@@ -474,6 +474,12 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
||||
case PE_PanelLineEdit:
|
||||
{
|
||||
painter->save();
|
||||
|
||||
// Fill the line edit background
|
||||
QRect filledRect = option->rect.adjusted(1, 1, -1, -1);
|
||||
painter->setBrushOrigin(filledRect.topLeft());
|
||||
painter->fillRect(filledRect, option->palette.base());
|
||||
|
||||
if (option->state & State_Enabled)
|
||||
drawCornerImage(d->lineeditImage, painter, option->rect, 2, 2, 2, 2);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user