diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-26 23:11:28 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-26 23:11:28 +1000 |
| commit | db1e2ea3bf7dd1f5ac1960ca4c9dc17757649460 (patch) | |
| tree | 49db4ec68518e475f6e24f96373b28dd85e40e19 /modules/detachedcontent/bluetooth/DeviceList.qml | |
| parent | dcontent: add bt pane (diff) | |
| download | caelestia-shell-db1e2ea3bf7dd1f5ac1960ca4c9dc17757649460.tar.gz caelestia-shell-db1e2ea3bf7dd1f5ac1960ca4c9dc17757649460.tar.bz2 caelestia-shell-db1e2ea3bf7dd1f5ac1960ca4c9dc17757649460.zip | |
dcontent: impl bt settings
Diffstat (limited to 'modules/detachedcontent/bluetooth/DeviceList.qml')
| -rw-r--r-- | modules/detachedcontent/bluetooth/DeviceList.qml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/detachedcontent/bluetooth/DeviceList.qml b/modules/detachedcontent/bluetooth/DeviceList.qml index 8f77cfd..91fca23 100644 --- a/modules/detachedcontent/bluetooth/DeviceList.qml +++ b/modules/detachedcontent/bluetooth/DeviceList.qml @@ -1,3 +1,6 @@ +pragma ComponentBehavior: Bound + +import ".." import qs.widgets import qs.services import qs.config @@ -11,6 +14,8 @@ import QtQuick.Controls ColumnLayout { id: root + required property Session session + anchors.fill: parent spacing: Appearance.spacing.small @@ -32,7 +37,11 @@ ColumnLayout { radius: Appearance.rounding.normal color: Colours.palette.m3surfaceContainer - StateLayer {} + StateLayer { + function onClicked(): void { + root.session.bt.active = null; + } + } StyledText { id: settingsText @@ -65,7 +74,7 @@ ColumnLayout { ScrollBar.vertical: StyledScrollBar {} - delegate: StyledRect { + delegate: Item { id: device required property BluetoothDevice modelData @@ -79,7 +88,10 @@ ColumnLayout { StateLayer { id: stateLayer + radius: Appearance.rounding.small + function onClicked(): void { + root.session.bt.active = device.modelData; } } @@ -88,8 +100,6 @@ ColumnLayout { anchors.fill: parent anchors.margins: Appearance.padding.normal - anchors.leftMargin: Appearance.padding.large - anchors.rightMargin: Appearance.padding.large spacing: Appearance.spacing.normal @@ -97,7 +107,7 @@ ColumnLayout { implicitWidth: implicitHeight implicitHeight: icon.implicitHeight + Appearance.padding.normal * 2 - radius: Appearance.rounding.full + radius: Appearance.rounding.normal color: device.connected ? Colours.palette.m3primaryContainer : device.modelData.bonded ? Colours.palette.m3secondaryContainer : Colours.palette.m3surfaceContainerHigh StyledRect { |