Fixes: Don't hover disabled buttons

Details:
Manhattan would incorrectly hover a disabled toolbutton.
This fixes it.
This commit is contained in:
Jens Bache-Wiig
2009-01-27 15:54:18 +01:00
parent f56869224e
commit fe4f03caa0

View File

@@ -518,7 +518,8 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
painter->drawLine(rect.bottomLeft(), rect.bottomRight()); painter->drawLine(rect.bottomLeft(), rect.bottomRight());
} }
#ifndef Q_WS_MAC #ifndef Q_WS_MAC
else if (option->state & State_MouseOver) { else if (option->state & State_Enabled &&
option->state & State_MouseOver) {
QColor lighter(255, 255, 255, 35); QColor lighter(255, 255, 255, 35);
painter->fillRect(rect, lighter); painter->fillRect(rect, lighter);
painter->drawLine(rect.topRight(), rect.bottomRight()); painter->drawLine(rect.topRight(), rect.bottomRight());