diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 17:18:55 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 17:18:55 +1000 |
| commit | e9c4bd0bb84857c65d7c814748c52ea037f240c2 (patch) | |
| tree | 33bea168a43ce0452d71bd151f4b176e4857399f /modules/dashboard/Media.qml | |
| parent | dashboard: dont update pane if not current (diff) | |
| download | caelestia-shell-e9c4bd0bb84857c65d7c814748c52ea037f240c2.tar.gz caelestia-shell-e9c4bd0bb84857c65d7c814748c52ea037f240c2.tar.bz2 caelestia-shell-e9c4bd0bb84857c65d7c814748c52ea037f240c2.zip | |
dashboard: center media pane
Diffstat (limited to 'modules/dashboard/Media.qml')
| -rw-r--r-- | modules/dashboard/Media.qml | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/modules/dashboard/Media.qml b/modules/dashboard/Media.qml index 9751572..15f0232 100644 --- a/modules/dashboard/Media.qml +++ b/modules/dashboard/Media.qml @@ -530,20 +530,29 @@ Item { } } - AnimatedImage { + Item { id: bongocat anchors.verticalCenter: parent.verticalCenter anchors.left: details.right - anchors.leftMargin: Appearance.spacing.large + anchors.leftMargin: Appearance.spacing.normal - playing: root.shouldUpdate && (Players.active?.isPlaying ?? false) - speed: BeatDetector.bpm / 300 - source: "root:/assets/bongocat.gif" - asynchronous: true - fillMode: AnimatedImage.PreserveAspectFit - } + implicitWidth: visualiser.width + implicitHeight: visualiser.height + + AnimatedImage { + anchors.centerIn: parent + width: visualiser.width * 0.75 + height: visualiser.height * 0.75 + + playing: root.shouldUpdate && (Players.active?.isPlaying ?? false) + speed: BeatDetector.bpm / 300 + source: "root:/assets/bongocat.gif" + asynchronous: true + fillMode: AnimatedImage.PreserveAspectFit + } + } component Control: StyledRect { id: control |