Skip to content

Commit bb95aa7

Browse files
committed
qml: Explicitly stop Skeleton Animation when not loading
1 parent 99ca9fd commit bb95aa7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/qml/controls/Skeleton.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Rectangle {
99
property color baseColor: Theme.color.neutral1
1010
property color highlightColor: Theme.color.neutral2
1111
property int shimmerDuration: 2500
12+
property bool loading: true
1213

1314
radius: 3
1415

@@ -32,7 +33,7 @@ Rectangle {
3233
}
3334

3435
ParallelAnimation {
35-
running: true
36+
running: loading
3637
loops: Animation.Infinite
3738
NumberAnimation {
3839
target: stop1

src/qml/pages/wallet/WalletBadge.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Button {
4343
Skeleton {
4444
Layout.preferredHeight: 30
4545
Layout.preferredWidth: 30
46+
loading: root.loading
4647
}
4748
ColumnLayout {
4849
spacing: 2
@@ -52,11 +53,13 @@ Button {
5253
Skeleton {
5354
Layout.preferredHeight: 15
5455
Layout.preferredWidth: 50
56+
loading: root.loading
5557
}
5658

5759
Skeleton {
5860
Layout.preferredHeight: 15
5961
Layout.preferredWidth: 114
62+
loading: root.loading
6063
}
6164
}
6265
}

0 commit comments

Comments
 (0)