forked from qt-creator/qt-creator
Theming: Fix regression in ComboBox label
The opacity is set to 0.8 if disabled (Not if enabled). Change-Id: I7016a083f71c700de68444a62e97d5dee4b733e7 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -745,7 +745,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
|||||||
painter->setPen(QColor(0, 0, 0, 70));
|
painter->setPen(QColor(0, 0, 0, 70));
|
||||||
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);
|
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);
|
||||||
}
|
}
|
||||||
if (option->state & State_Enabled)
|
if (!option->state & State_Enabled)
|
||||||
painter->setOpacity(0.8);
|
painter->setOpacity(0.8);
|
||||||
painter->setPen(creatorTheme()->color(Theme::ComboBoxTextColor));
|
painter->setPen(creatorTheme()->color(Theme::ComboBoxTextColor));
|
||||||
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);
|
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);
|
||||||
|
|||||||
Reference in New Issue
Block a user