From 649cd6fb22f11550fd855e8854b7e9ed96f5a0a8 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 16 Oct 2014 22:34:18 +0300 Subject: [PATCH] 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 --- src/plugins/coreplugin/manhattanstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index fecf8b94725..8728b7fb752 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -745,7 +745,7 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt painter->setPen(QColor(0, 0, 0, 70)); 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->setPen(creatorTheme()->color(Theme::ComboBoxTextColor)); painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignLeft | Qt::AlignVCenter, text);