From c31edc876b822038dcaa5094f8ef3be7691f2707 Mon Sep 17 00:00:00 2001 From: Noah Davis Date: Thu, 20 Aug 2020 19:40:46 -0400 Subject: [PATCH] Use ButtonFocus and ButtonHover in PC3 CheckIndicator --- .../plasmacomponents3/CheckIndicator.qml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/declarativeimports/plasmacomponents3/CheckIndicator.qml b/src/declarativeimports/plasmacomponents3/CheckIndicator.qml index a80a42f1c..04322f5c8 100644 --- a/src/declarativeimports/plasmacomponents3/CheckIndicator.qml +++ b/src/declarativeimports/plasmacomponents3/CheckIndicator.qml @@ -17,6 +17,11 @@ PlasmaCore.FrameSvgItem { implicitHeight: implicitWidth opacity: control.enabled ? 1 : 0.6 + Private.ButtonShadow { + anchors.fill: parent + showShadow: !control.pressed + } + PlasmaCore.SvgItem { svg: PlasmaCore.Svg { id: checkmarkSvg @@ -47,9 +52,14 @@ PlasmaCore.FrameSvgItem { } } } - Private.ButtonShadow { - z: -1 + + Private.ButtonFocus { anchors.fill: parent - state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "shadow") + showFocus: control.activeFocus && !control.pressed + } + + Private.ButtonHover { + anchors.fill: parent + showHover: control.hovered && !control.pressed } }