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
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue