From 9a87f66962b92b3197f5b75ef09e933e10e488a8 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Sun, 17 Nov 2024 17:23:44 +0100 Subject: [PATCH] chore: misc --- src/shell.qml | 16 ++++++++-------- src/widgets/mpris/MprisSmall.qml | 8 +++++--- src/widgets/workspaces/WorkspaceIPC.qml | 1 - 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/shell.qml b/src/shell.qml index 2d95577..996b9df 100644 --- a/src/shell.qml +++ b/src/shell.qml @@ -13,17 +13,17 @@ ShellRoot { } } - Component.onCompleted: { - Quickshell.reloadCompleted.connect(() => loader.active = false); - Quickshell.reloadFailed.connect(e => { - loader.active = true; - loader.message = e; - }); - } - LazyLoader { id: loader + Component.onCompleted: { + Quickshell.reloadCompleted.connect(() => loader.active = false); + Quickshell.reloadFailed.connect(e => { + loader.active = true; + loader.message = e; + }); + } + property string message: "" PanelWindow { diff --git a/src/widgets/mpris/MprisSmall.qml b/src/widgets/mpris/MprisSmall.qml index 6a6d255..8d4fa38 100644 --- a/src/widgets/mpris/MprisSmall.qml +++ b/src/widgets/mpris/MprisSmall.qml @@ -26,17 +26,19 @@ BRectangle { orientation: Qt.Horizontal snapMode: ListView.SnapOneItem spacing: 10 - delegate: Item { + delegate: BRectangle { id: card required property var modelData property MprisPlayer player: modelData + width: mprisSmall.width height: mprisSmall.height + radius: 15 BlurredImage { source: card.player?.trackArtUrl ?? "" anchors.fill: parent - radius: 15 + radius: parent.radius } RowLayout { @@ -104,7 +106,7 @@ BRectangle { size: 20 } BIconButton { - source: Quickshell.iconPath(card.player.playbackState === MprisPlaybackState.Playing ? "media-playback-pause" : "media-playback-start") + source: Quickshell.iconPath(card.player?.playbackState === MprisPlaybackState.Playing ? "media-playback-pause" : "media-playback-start") onClicked: card.player?.togglePlaying() size: 20 } diff --git a/src/widgets/workspaces/WorkspaceIPC.qml b/src/widgets/workspaces/WorkspaceIPC.qml index 58d0674..e797917 100644 --- a/src/widgets/workspaces/WorkspaceIPC.qml +++ b/src/widgets/workspaces/WorkspaceIPC.qml @@ -1,6 +1,5 @@ import QtQuick import Quickshell -import Quickshell.Io import Quickshell.Hyprland import Quickshell.I3