chore: misc
This commit is contained in:
parent
f4fa7deadf
commit
9a87f66962
3 changed files with 13 additions and 12 deletions
|
@ -13,17 +13,17 @@ ShellRoot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
Quickshell.reloadCompleted.connect(() => loader.active = false);
|
|
||||||
Quickshell.reloadFailed.connect(e => {
|
|
||||||
loader.active = true;
|
|
||||||
loader.message = e;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
LazyLoader {
|
LazyLoader {
|
||||||
id: loader
|
id: loader
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
Quickshell.reloadCompleted.connect(() => loader.active = false);
|
||||||
|
Quickshell.reloadFailed.connect(e => {
|
||||||
|
loader.active = true;
|
||||||
|
loader.message = e;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
property string message: ""
|
property string message: ""
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
|
|
|
@ -26,17 +26,19 @@ BRectangle {
|
||||||
orientation: Qt.Horizontal
|
orientation: Qt.Horizontal
|
||||||
snapMode: ListView.SnapOneItem
|
snapMode: ListView.SnapOneItem
|
||||||
spacing: 10
|
spacing: 10
|
||||||
delegate: Item {
|
delegate: BRectangle {
|
||||||
id: card
|
id: card
|
||||||
required property var modelData
|
required property var modelData
|
||||||
property MprisPlayer player: modelData
|
property MprisPlayer player: modelData
|
||||||
|
|
||||||
width: mprisSmall.width
|
width: mprisSmall.width
|
||||||
height: mprisSmall.height
|
height: mprisSmall.height
|
||||||
|
radius: 15
|
||||||
|
|
||||||
BlurredImage {
|
BlurredImage {
|
||||||
source: card.player?.trackArtUrl ?? ""
|
source: card.player?.trackArtUrl ?? ""
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 15
|
radius: parent.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -104,7 +106,7 @@ BRectangle {
|
||||||
size: 20
|
size: 20
|
||||||
}
|
}
|
||||||
BIconButton {
|
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()
|
onClicked: card.player?.togglePlaying()
|
||||||
size: 20
|
size: 20
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell.I3
|
import Quickshell.I3
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue