Ensure opacity/rotation of button icon is reset
After loading finished
This commit is contained in:
parent
560981a97e
commit
97b1608bcb
|
@ -20,18 +20,28 @@ HRowLayout {
|
|||
|
||||
|
||||
HIcon {
|
||||
property bool loading: button.loading || false
|
||||
|
||||
id: icon
|
||||
svgName: button.icon.name
|
||||
colorize: button.icon.color
|
||||
cache: button.icon.cache
|
||||
|
||||
onLoadingChanged: if (! loading) resetAnimations.start()
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
HNumberAnimation {
|
||||
|
||||
ParallelAnimation {
|
||||
id: resetAnimations
|
||||
HNumberAnimation { target: icon; property: "opacity"; to: 1 }
|
||||
HNumberAnimation { target: icon; property: "rotation"; to: 0 }
|
||||
}
|
||||
|
||||
|
||||
HNumberAnimation on opacity {
|
||||
id: blink
|
||||
target: icon
|
||||
property: "opacity"
|
||||
from: 1
|
||||
to: 0.5
|
||||
factor: 2
|
||||
|
|
Loading…
Reference in New Issue
Block a user