Use ButtonFocus and ButtonHover in PC3 ComboBox
This commit is contained in:
parent
8fe3f656e8
commit
a4e7ea6807
@ -185,27 +185,27 @@ T.ComboBox {
|
|||||||
prefix: editable
|
prefix: editable
|
||||||
? "base"
|
? "base"
|
||||||
: (control.pressed ? "pressed" : "normal")
|
: (control.pressed ? "pressed" : "normal")
|
||||||
|
|
||||||
|
Private.ButtonShadow {
|
||||||
|
anchors.fill: parent
|
||||||
|
showShadow: !parent.editable && !control.pressed
|
||||||
|
}
|
||||||
|
|
||||||
Private.TextFieldFocus {
|
Private.TextFieldFocus {
|
||||||
visible: parent.editable
|
visible: parent.editable
|
||||||
z: -1
|
z: -1
|
||||||
state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "hidden")
|
state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "hidden")
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
Private.ButtonShadow {
|
|
||||||
z: -1
|
Private.ButtonFocus {
|
||||||
visible: !parent.editable
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
state: {
|
showFocus: control.activeFocus && !control.pressed
|
||||||
if (control.pressed) {
|
}
|
||||||
return "hidden"
|
|
||||||
} else if (control.hovered) {
|
Private.ButtonHover {
|
||||||
return "hover"
|
anchors.fill: parent
|
||||||
} else if (control.activeFocus) {
|
showHover: control.hovered && !control.pressed
|
||||||
return "focus"
|
|
||||||
} else {
|
|
||||||
return "shadow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
Loading…
Reference in New Issue
Block a user