hide the shadow when toggled and no focus

This commit is contained in:
Marco Martin 2011-10-10 15:33:28 +02:00
parent 86e66746d1
commit 2dbc92c534

View File

@ -75,7 +75,9 @@ Item {
onActiveFocusChanged: { onActiveFocusChanged: {
if (activeFocus) { if (activeFocus) {
shadow.state = "focus" shadow.state = "focus"
}else { } else if (checked) {
shadow.state = "hidden"
} else {
shadow.state = "shadow" shadow.state = "shadow"
} }
} }
@ -147,6 +149,8 @@ Item {
onExited: { onExited: {
if (button.activeFocus) { if (button.activeFocus) {
shadow.state = "focus" shadow.state = "focus"
} else if (checked) {
shadow.state = "hidden"
} else { } else {
shadow.state = "shadow" shadow.state = "shadow"
} }