move stuff into components
This commit is contained in:
parent
6370732e4e
commit
14292e6683
17 changed files with 81 additions and 149 deletions
|
|
@ -1,11 +1,13 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Quickshell.Services.Pipewire
|
||||
import "." as M
|
||||
|
||||
Row {
|
||||
M.BarSection {
|
||||
id: root
|
||||
spacing: 4
|
||||
tooltip: (root.sink?.description ?? root.sink?.name ?? "Unknown sink") +
|
||||
"\nVolume: " + Math.round(root.volume * 100) + "%" +
|
||||
(root.muted ? "\nMuted" : "")
|
||||
|
||||
PwObjectTracker {
|
||||
objects: [Pipewire.defaultAudioSink]
|
||||
|
|
@ -24,14 +26,6 @@ Row {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
HoverHandler { id: hover }
|
||||
ToolTip {
|
||||
visible: hover.hovered
|
||||
text: (root.sink?.description ?? root.sink?.name ?? "Unknown sink") +
|
||||
"\nVolume: " + Math.round(root.volume * 100) + "%" +
|
||||
(root.muted ? "\nMuted" : "")
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
onTapped: if (root.sink?.audio) root.sink.audio.muted = !root.sink.audio.muted
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue