[PlasmaComponents3] Show ToolButton focus effect and omit shadow when flat
Make sure the shadow item--which includes the hover effect, if present--can be shown when the ToolButton is focused, and also always omit the shadow when the ToolButton is flat.
This commit is contained in:
parent
e7fadd1671
commit
bc4a6d06bc
@ -108,7 +108,8 @@ T.ToolButton {
|
||||
background: Item {
|
||||
Private.ButtonShadow {
|
||||
anchors.fill: parent
|
||||
visible: (!control.flat || control.hovered) && (!control.pressed || !control.checked)
|
||||
visible: (!control.flat || control.hovered || control.activeFocus) && (!control.pressed || !control.checked)
|
||||
|
||||
state: {
|
||||
if (control.pressed) {
|
||||
return "hidden"
|
||||
@ -117,7 +118,7 @@ T.ToolButton {
|
||||
} else if (control.activeFocus) {
|
||||
return "focus"
|
||||
} else {
|
||||
return "shadow"
|
||||
return control.flat ? "shadow" : "hidden"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user