fix shadow disabling
This commit is contained in:
parent
c498292a55
commit
1d4f9a5c77
@ -47,11 +47,6 @@ Item {
|
||||
target: shadow
|
||||
opacity: 1
|
||||
}
|
||||
PropertyChanges {
|
||||
target: hover
|
||||
opacity: 0
|
||||
prefix: "hover"
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "hidden"
|
||||
|
@ -41,15 +41,21 @@ Item {
|
||||
// disabled buttons
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
|
||||
function pressButton() {
|
||||
function pressButton()
|
||||
{
|
||||
if (button.enabled) {
|
||||
buttonContent.state = "pressed"
|
||||
shadow.state = "hidden"
|
||||
}
|
||||
}
|
||||
|
||||
function releaseButton() {
|
||||
function releaseButton()
|
||||
{
|
||||
if (button.enabled) {
|
||||
buttonContent.state = "normal"
|
||||
if (!checked) {
|
||||
shadow.state = "shadow"
|
||||
}
|
||||
|
||||
if (button.checkable) {
|
||||
button.checked = !button.checked;
|
||||
|
Loading…
Reference in New Issue
Block a user