panel title bar: add title, action buttons slot, divider; bt to popup mode; move wifi/bt toggles to title bar
This commit is contained in:
parent
46f14d5d36
commit
d4407ee538
7 changed files with 128 additions and 184 deletions
|
|
@ -67,22 +67,37 @@ M.BarSection {
|
|||
icon: "\uF294"
|
||||
color: root.state === "off" ? M.Theme.base04 : root.accentColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
TapHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onTapped: {
|
||||
M.FlyoutState.visible = false;
|
||||
btLoader.active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
M.BarLabel {
|
||||
visible: root.state === "connected"
|
||||
label: root.device + (root.batteryPct >= 0 ? " " + root.batteryPct + "%" : "")
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
TapHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onTapped: {
|
||||
M.FlyoutState.visible = false;
|
||||
btLoader.active = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
required property var bar
|
||||
|
||||
readonly property bool _anyHover: root._hovered || bluetoothMenu.panelHovered || bluetoothMenu._busy
|
||||
|
||||
M.BluetoothMenu {
|
||||
id: bluetoothMenu
|
||||
showPanel: root._anyHover
|
||||
screen: root.bar.screen
|
||||
anchorItem: root
|
||||
accentColor: root.accentColor
|
||||
LazyLoader {
|
||||
id: btLoader
|
||||
active: false
|
||||
M.BluetoothMenu {
|
||||
accentColor: root.accentColor
|
||||
screen: QsWindow.window?.screen ?? null
|
||||
anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
||||
onDismissed: btLoader.active = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue