diff --git a/declarativeimports/plasmacomponents/platformcomponents/touch/ButtonShadow.qml b/declarativeimports/plasmacomponents/platformcomponents/touch/ButtonShadow.qml index 9e55aaa7e..040442bee 100644 --- a/declarativeimports/plasmacomponents/platformcomponents/touch/ButtonShadow.qml +++ b/declarativeimports/plasmacomponents/platformcomponents/touch/ButtonShadow.qml @@ -47,11 +47,6 @@ Item { target: shadow opacity: 1 } - PropertyChanges { - target: hover - opacity: 0 - prefix: "hover" - } }, State { name: "hidden" diff --git a/declarativeimports/plasmacomponents/qml/Button.qml b/declarativeimports/plasmacomponents/qml/Button.qml index 3bed4ab35..8d44164e8 100644 --- a/declarativeimports/plasmacomponents/qml/Button.qml +++ b/declarativeimports/plasmacomponents/qml/Button.qml @@ -41,15 +41,21 @@ Item { // disabled buttons opacity: enabled ? 1.0 : 0.5 - function pressButton() { - if(button.enabled) { + function pressButton() + { + if (button.enabled) { buttonContent.state = "pressed" + shadow.state = "hidden" } } - function releaseButton() { - if(button.enabled) { + function releaseButton() + { + if (button.enabled) { buttonContent.state = "normal" + if (!checked) { + shadow.state = "shadow" + } if (button.checkable) { button.checked = !button.checked;