From 3755e1fdd6b26827ac461bb71d0a9e6666e5f7a1 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Fri, 23 Jul 2021 11:57:16 +0200 Subject: [PATCH] feat(StatusBaseInput): add hover state visuals Closes #285 --- ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml b/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml index 869e4aa3ce..199340b9b2 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusBaseInput.qml @@ -56,7 +56,12 @@ Item { clip: true border.width: 1 - border.color: edit.activeFocus ? Theme.palette.primaryColor1 : "transparent" + border.color: { + if (edit.activeFocus) { + return Theme.palette.primaryColor1; + } + return sensor.containsMouse ? Theme.palette.primaryColor2 : "transparent" + } Flickable { id: flick @@ -132,9 +137,10 @@ Item { } // Flickable MouseArea { + id: sensor + hoverEnabled: true anchors.fill: parent cursorShape: Qt.IBeamCursor - enabled: !edit.activeFocus onClicked: edit.forceActiveFocus() } } // Rectangle