decouple clickable from styledlabel
This commit is contained in:
parent
bf55feceb4
commit
ad8df5e6a0
1 changed files with 5 additions and 14 deletions
|
|
@ -9,22 +9,13 @@ MouseArea {
|
||||||
hoverEnabled: !disabled
|
hoverEnabled: !disabled
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
StyledLabel {
|
Rectangle {
|
||||||
id: background
|
id: background
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
states: State {
|
|
||||||
name: "hovered"
|
radius: Dimensions.radius
|
||||||
when: mouseArea.containsMouse
|
color: mouseArea.containsMouse ? Theme.palette.primary : Theme.palette.base300
|
||||||
PropertyChanges {
|
Behavior on color {
|
||||||
background {
|
|
||||||
color: Theme.palette.primary
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
transitions: Transition {
|
|
||||||
from: ""
|
|
||||||
to: "hovered"
|
|
||||||
reversible: true
|
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
properties: "color"
|
properties: "color"
|
||||||
duration: 200
|
duration: 200
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue