mpris flyout menu with transport controls, progress bar, album art
This commit is contained in:
parent
2f31783ead
commit
a5cb257891
4 changed files with 234 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.Mpris
|
||||
import "." as M
|
||||
|
||||
|
|
@ -37,8 +38,21 @@ M.BarSection {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
required property var bar
|
||||
|
||||
TapHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onTapped: root.player?.togglePlaying()
|
||||
onTapped: menuLoader.active = !menuLoader.active
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: menuLoader
|
||||
active: false
|
||||
sourceComponent: M.MprisMenu {
|
||||
player: root.player
|
||||
screen: root.bar.screen
|
||||
anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
||||
onDismissed: menuLoader.active = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue