diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-05 16:31:32 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-05 16:31:32 +1000 |
| commit | 8cc78cfaf3b60571e3e98c1268b3e41a7dadc055 (patch) | |
| tree | 996f8789cd67e35c80ceafbfd4d4434a23cd554a /modules | |
| parent | internal: rename dcontent -> controlcenter (diff) | |
| download | caelestia-shell-8cc78cfaf3b60571e3e98c1268b3e41a7dadc055.tar.gz caelestia-shell-8cc78cfaf3b60571e3e98c1268b3e41a7dadc055.tar.bz2 caelestia-shell-8cc78cfaf3b60571e3e98c1268b3e41a7dadc055.zip | |
controlcenter/bt: better toggles collapsing logic
Hardcoded but eh
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/controlcenter/bluetooth/DeviceList.qml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/controlcenter/bluetooth/DeviceList.qml b/modules/controlcenter/bluetooth/DeviceList.qml index d975e17..e93c569 100644 --- a/modules/controlcenter/bluetooth/DeviceList.qml +++ b/modules/controlcenter/bluetooth/DeviceList.qml @@ -17,6 +17,8 @@ ColumnLayout { id: root required property Session session + readonly property bool smallDiscoverable: width <= 540 + readonly property bool smallPairable: width <= 480 anchors.fill: parent spacing: Appearance.spacing.small @@ -48,8 +50,8 @@ ColumnLayout { ToggleButton { toggled: Bluetooth.defaultAdapter?.discoverable ?? false - icon: QsWindow.window.screen.height <= 1080 ? "group_search" : "" - label: QsWindow.window.screen.height <= 1080 ? "" : qsTr("Discoverable") + icon: root.smallDiscoverable ? "group_search" : "" + label: root.smallDiscoverable ? "" : qsTr("Discoverable") function onClicked(): void { const adapter = Bluetooth.defaultAdapter; @@ -61,7 +63,7 @@ ColumnLayout { ToggleButton { toggled: Bluetooth.defaultAdapter?.pairable ?? false icon: "missing_controller" - label: QsWindow.window.screen.height <= 960 ? "" : qsTr("Pairable") + label: root.smallPairable ? "" : qsTr("Pairable") function onClicked(): void { const adapter = Bluetooth.defaultAdapter; |