From a4e7ea68072788d90eb43463f18cb5b266c315f3 Mon Sep 17 00:00:00 2001 From: Noah Davis Date: Thu, 20 Aug 2020 22:25:33 -0400 Subject: [PATCH] Use ButtonFocus and ButtonHover in PC3 ComboBox --- .../plasmacomponents3/ComboBox.qml | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/declarativeimports/plasmacomponents3/ComboBox.qml b/src/declarativeimports/plasmacomponents3/ComboBox.qml index f31316d14..70b4c85cb 100644 --- a/src/declarativeimports/plasmacomponents3/ComboBox.qml +++ b/src/declarativeimports/plasmacomponents3/ComboBox.qml @@ -185,27 +185,27 @@ T.ComboBox { prefix: editable ? "base" : (control.pressed ? "pressed" : "normal") + + Private.ButtonShadow { + anchors.fill: parent + showShadow: !parent.editable && !control.pressed + } + Private.TextFieldFocus { visible: parent.editable z: -1 state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "hidden") anchors.fill: parent } - Private.ButtonShadow { - z: -1 - visible: !parent.editable + + Private.ButtonFocus { anchors.fill: parent - state: { - if (control.pressed) { - return "hidden" - } else if (control.hovered) { - return "hover" - } else if (control.activeFocus) { - return "focus" - } else { - return "shadow" - } - } + showFocus: control.activeFocus && !control.pressed + } + + Private.ButtonHover { + anchors.fill: parent + showHover: control.hovered && !control.pressed } MouseArea {