no desktop for server
This commit is contained in:
@@ -5,6 +5,7 @@ import QtQuick.Layouts
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Bluetooth
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
|
||||
@@ -23,7 +24,8 @@ ClippingWrapperRectangle {
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
|
||||
property var window: null
|
||||
required property PanelWindow window
|
||||
required property real popupOffset
|
||||
id: root
|
||||
|
||||
PopupWindow {
|
||||
@@ -31,7 +33,7 @@ ClippingWrapperRectangle {
|
||||
id: menu
|
||||
|
||||
anchor.window: window
|
||||
anchor.rect.x: root.parent.x + root.parent.width - width
|
||||
anchor.rect.x: popupOffset - width
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 250
|
||||
implicitHeight: 150
|
||||
@@ -49,14 +51,84 @@ ClippingWrapperRectangle {
|
||||
|
||||
spacing: 0
|
||||
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
implicitWidth: parent.width - 2 * Layout.margins
|
||||
implicitHeight: 30
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
color: "#ff3333aa"
|
||||
|
||||
RowLayout {
|
||||
Text {
|
||||
text: 'Bluetooth'
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
}
|
||||
|
||||
Switch {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
//Layout.margins: 5
|
||||
checked: Bluetooth.defaultAdapter.enabled
|
||||
onClicked: Bluetooth.defaultAdapter.enabled = checked
|
||||
}
|
||||
}
|
||||
|
||||
text: 'shutdown'
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
|
||||
implicitWidth: parent.width - 4 * Layout.margins
|
||||
implicitHeight: menu.height / 2
|
||||
|
||||
id: scroll
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
Repeater {
|
||||
|
||||
id: rep
|
||||
|
||||
model: Bluetooth.devices.values
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
color: "#ff3333aa"
|
||||
|
||||
implicitWidth: menu.width - 3 * scroll.x
|
||||
implicitHeight: 40
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
|
||||
RowLayout {
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
|
||||
text: rep.model[index].name
|
||||
}
|
||||
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.rightMargin: 5
|
||||
text: 'Connect'
|
||||
|
||||
onClicked: rep.model[index].connected = !rep.model[index].connected
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user