forked from qt-creator/qt-creator
ManhattanStyle: Fix wrong operator precedence
!option->state & State_Enabled is accidentially satisfied because State_Enabled is 1, so the condition is true for any non-zero value of option->state. Change-Id: I965012ceecbad7296fae4eff7d429dcb8391aa2c Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
4f70388aca
commit
649cd6fb22
@@ -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