decouple clickable from styledlabel

This commit is contained in:
Benjamin Palko 2025-07-23 10:17:56 -04:00
parent bf55feceb4
commit ad8df5e6a0

View file

@ -9,22 +9,13 @@ MouseArea {
hoverEnabled: !disabled
cursorShape: Qt.PointingHandCursor
StyledLabel {
Rectangle {
id: background
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.base300
Behavior on color {
ColorAnimation {
properties: "color"
duration: 200