diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-10-08 12:34:30 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-23 21:51:21 +0100 |
commit | 75633117d4a72032d9d059190b8eef607033d458 (patch) | |
tree | e58e89a0e963622ca5df45887da79b3031b26c81 /gui/components/StatusBox.qml | |
parent | ef683e13aaefebd9cd1f267d5339e1ef574c42d0 (diff) |
[gui] fade behavior
Diffstat (limited to 'gui/components/StatusBox.qml')
-rw-r--r-- | gui/components/StatusBox.qml | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gui/components/StatusBox.qml b/gui/components/StatusBox.qml index 17132ea..6036264 100644 --- a/gui/components/StatusBox.qml +++ b/gui/components/StatusBox.qml @@ -86,6 +86,7 @@ Item { anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter text: "" + FadeBehavior on text { } } } @@ -100,6 +101,11 @@ Item { height: 120 } + // TODO this can be synced with opacity serial animation, see + // https://doc.qt.io/qt-5/qml-qtquick-animatedimage.html#example-usage + // If you want to customize your asset, here's how: + // convert -delay 50 -loop 0 ravens2_*.png ravens.gif + AnimatedImage { id: connectionImage height: 160 @@ -107,12 +113,17 @@ Item { source: "../resources/icon-noshield.svg" anchors.horizontalCenter: parent.horizontalCenter fillMode: Image.PreserveAspectFit - onStatusChanged: playing = (status == AnimatedImage.Ready) + OpacityAnimator on opacity{ + id: fadeIn + from: 0.5; + to: 1; + duration: 1000 + } + onStatusChanged: { + playing = (status == AnimatedImage.Ready) + fadeIn.start() + } } - // TODO this can be synced with opacity serial animation, see - // https://doc.qt.io/qt-5/qml-qtquick-animatedimage.html#example-usage - // If you want to customize your asset, here's how: - // convert -delay 50 -loop 0 ravens2_*.png ravens.gif VerticalSpacer { id: spacerPostImg |