forked from qt-creator/qt-creator
Fixes: Don't hover disabled buttons
Details: Manhattan would incorrectly hover a disabled toolbutton. This fixes it.
This commit is contained in:
@@ -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());
|
||||||
|
Reference in New Issue
Block a user