Color animations: more uniform across NWidgets
This commit is contained in:
parent
102aca0fa0
commit
d1f5d301c2
7 changed files with 60 additions and 16 deletions
|
|
@ -37,6 +37,18 @@ RowLayout {
|
|||
border.color: root.checked ? root.activeColor : Color.mOutline
|
||||
border.width: Math.max(1, Style.borderM * scaling)
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Style.animationNormal
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: Style.animationNormal
|
||||
}
|
||||
}
|
||||
|
||||
NIcon {
|
||||
visible: root.checked
|
||||
anchors.centerIn: parent
|
||||
|
|
@ -59,16 +71,5 @@ RowLayout {
|
|||
}
|
||||
onClicked: root.toggled(!root.checked)
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Style.animationFast
|
||||
}
|
||||
}
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: Style.animationFast
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue