fix shadow disabling

This commit is contained in:
Marco Martin 2011-11-08 18:19:25 +01:00
parent c498292a55
commit 1d4f9a5c77
2 changed files with 10 additions and 9 deletions

View File

@ -47,11 +47,6 @@ Item {
target: shadow
opacity: 1
}
PropertyChanges {
target: hover
opacity: 0
prefix: "hover"
}
},
State {
name: "hidden"

View File

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