never draw disabled flat buttons

This commit is contained in:
Marco Martin 2012-10-11 12:32:58 +02:00
parent e2f90d95d2
commit 9f0d2338b1
2 changed files with 2 additions and 2 deletions

View File

@ -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 }

View File

@ -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 }
}