bluetooth flyout: paired devices with connect/disconnect

This commit is contained in:
Damocles 2026-04-12 18:27:20 +02:00
parent a230b72344
commit fd71211176
4 changed files with 159 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import QtQuick
import Quickshell
import Quickshell.Io
import "." as M
@ -66,12 +67,29 @@ M.BarSection {
anchors.verticalCenter: parent.verticalCenter
}
required property var bar
TapHandler {
acceptedButtons: Qt.LeftButton
cursorShape: Qt.PointingHandCursor
onTapped: menuLoader.active = !menuLoader.active
}
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: {
toggle.cmd = root.state === "off" ? "on" : "off";
toggle.running = true;
}
}
Loader {
id: menuLoader
active: false
sourceComponent: M.BluetoothMenu {
screen: root.bar.screen
anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
onDismissed: menuLoader.active = false
}
}
}