From c4f0fbc1ee4d537a98c57e2678d4cae4348bad17 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Wed, 23 Jul 2025 10:17:56 -0400 Subject: [PATCH] decouple clickable from styledlabel --- styled/Clickable.qml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/styled/Clickable.qml b/styled/Clickable.qml index 8f642f6..7d9158e 100644 --- a/styled/Clickable.qml +++ b/styled/Clickable.qml @@ -4,31 +4,19 @@ import "../config/" MouseArea { id: mouseArea - property bool disabled: false - - hoverEnabled: !disabled + hoverEnabled: true cursorShape: Qt.PointingHandCursor - StyledLabel { - id: background + Rectangle { anchors.fill: parent - states: State { - name: "hovered" - when: mouseArea.containsMouse - PropertyChanges { - background { - color: Theme.palette.primary - } - } - } - transitions: Transition { - from: "" - to: "hovered" - reversible: true + + radius: Dimensions.radius + color: mouseArea.containsMouse ? Theme.palette.primary : Theme.palette.base100 + Behavior on color { ColorAnimation { properties: "color" duration: 200 - easing.type: Easing.InOutCubic + easing.type: Easing.InOutQuad } } }