network chooser: click to show known available connections

This commit is contained in:
Damocles 2026-04-12 18:24:36 +02:00
parent 20d3ad12f9
commit a230b72344
4 changed files with 191 additions and 1 deletions

View file

@ -1,4 +1,5 @@
import QtQuick
import Quickshell
import Quickshell.Io
import "." as M
@ -91,4 +92,20 @@ M.BarSection {
anchors.verticalCenter: parent.verticalCenter
}
required property var bar
TapHandler {
cursorShape: Qt.PointingHandCursor
onTapped: menuLoader.active = !menuLoader.active
}
Loader {
id: menuLoader
active: false
sourceComponent: M.NetworkMenu {
screen: root.bar.screen
anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
onDismissed: menuLoader.active = false
}
}
}