bluetooth menu coming along
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
@@ -10,6 +11,8 @@ import "../Services/"
|
||||
Container {
|
||||
id: root
|
||||
|
||||
property double devicePlaqeuSpacing
|
||||
property double devicePlaqueHeight
|
||||
required property HyprlandMonitor monitor
|
||||
property bool opened: false
|
||||
|
||||
@@ -38,6 +41,7 @@ Container {
|
||||
|
||||
PropertyChanges {
|
||||
root.boxHeight: 300
|
||||
root.boxRadius: 12
|
||||
root.boxWidth: 350
|
||||
}
|
||||
|
||||
@@ -78,9 +82,18 @@ Container {
|
||||
id: deviceList
|
||||
|
||||
Column {
|
||||
property string component: "deviceList"
|
||||
id: deviceListRoot
|
||||
|
||||
spacing: 3
|
||||
property string component: "deviceList"
|
||||
property double plaqueHeight: 60
|
||||
property double plaqueSpacing: 4
|
||||
|
||||
spacing: plaqueSpacing
|
||||
|
||||
Item {
|
||||
implicitHeight: 1
|
||||
implicitWidth: 10
|
||||
}
|
||||
|
||||
Repeater {
|
||||
delegate: devicePlaque
|
||||
@@ -93,14 +106,45 @@ Container {
|
||||
Rectangle {
|
||||
id: devicePlaqueRoot
|
||||
|
||||
readonly property variant deviceText: BluetoothManager.getDeviceText(modelData)
|
||||
readonly property double margin: 5
|
||||
required property var modelData
|
||||
|
||||
color: Colors.surface1
|
||||
implicitHeight: 10
|
||||
implicitHeight: deviceListRoot.plaqueHeight
|
||||
radius: 10
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: devicePlaqueRoot.margin
|
||||
right: parent.right
|
||||
rightMargin: devicePlaqueRoot.margin
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
id: iconContainer
|
||||
|
||||
property double margin: 7
|
||||
|
||||
color: Colors.text
|
||||
implicitWidth: deviceListRoot.plaqueHeight - (margin * 2)
|
||||
radius: 4
|
||||
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
margins: iconContainer.margin
|
||||
top: parent.top
|
||||
}
|
||||
|
||||
CenteredText {
|
||||
fontSize: 17
|
||||
text: devicePlaqueRoot.deviceText["icon"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user