From 9f0d2338b1a9d859774969f969dc627bbf7e21ae Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 11 Oct 2012 12:32:58 +0200 Subject: [PATCH] never draw disabled flat buttons --- .../plasmacomponents/platformcomponents/touch/ToolButton.qml | 2 +- declarativeimports/plasmacomponents/qml/ToolButton.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml b/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml index 9fec979b8..502ceef43 100644 --- a/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml +++ b/declarativeimports/plasmacomponents/platformcomponents/touch/ToolButton.qml @@ -162,7 +162,7 @@ Item { elementId: (internal.userPressed || checked) ? "pressed" : "normal" width: parent.height height: width - opacity: (internal.userPressed || checked || !flat || (roundShadow.hasOverState && mouse.containsMouse)) ? 1 : 0 + opacity: (internal.userPressed || checked || !flat || (roundShadow.hasOverState && mouse.containsMouse && button.enabled)) ? 1 : 0 Behavior on opacity { PropertyAnimation { duration: 250 } diff --git a/declarativeimports/plasmacomponents/qml/ToolButton.qml b/declarativeimports/plasmacomponents/qml/ToolButton.qml index 799f80809..f63130d7c 100644 --- a/declarativeimports/plasmacomponents/qml/ToolButton.qml +++ b/declarativeimports/plasmacomponents/qml/ToolButton.qml @@ -179,7 +179,7 @@ Item { imagePath: "widgets/button" prefix: (internal.userPressed || checked) ? "pressed" : "normal" //internal: if there is no hover status, don't paint on mouse over in touchscreens - opacity: (internal.userPressed || checked || !flat || (shadow.hasOverState && mouse.containsMouse)) ? 1 : 0 + opacity: (internal.userPressed || checked || !flat || (shadow.hasOverState && mouse.containsMouse && button.enabled)) ? 1 : 0 Behavior on opacity { PropertyAnimation { duration: 250 } }