summaryrefslogtreecommitdiff
path: root/modules/controlcenter/bluetooth/BtPane.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-03 17:53:06 +1100
committerGitHub <noreply@github.com>2026-01-03 17:53:06 +1100
commitbdcd13222fc6edc77c779a396900ab909e7d5439 (patch)
treef9457f3c91c05ec852f974f239d06aca52a3918e /modules/controlcenter/bluetooth/BtPane.qml
parent[CI] chore: update flake (diff)
parentMerge branch 'caelestia-dots:main' into main (diff)
downloadcaelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.tar.gz
caelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.tar.bz2
caelestia-shell-bdcd13222fc6edc77c779a396900ab909e7d5439.zip
Merge pull request #906 from atdma/main
controlcenter: many setting panes and minor features
Diffstat (limited to 'modules/controlcenter/bluetooth/BtPane.qml')
-rw-r--r--modules/controlcenter/bluetooth/BtPane.qml137
1 files changed, 38 insertions, 99 deletions
diff --git a/modules/controlcenter/bluetooth/BtPane.qml b/modules/controlcenter/bluetooth/BtPane.qml
index 96dc002..a987e75 100644
--- a/modules/controlcenter/bluetooth/BtPane.qml
+++ b/modules/controlcenter/bluetooth/BtPane.qml
@@ -1,134 +1,73 @@
pragma ComponentBehavior: Bound
import ".."
-import qs.components.effects
+import "../components"
+import "."
+import qs.components
+import qs.components.controls
import qs.components.containers
import qs.config
import Quickshell.Widgets
import Quickshell.Bluetooth
import QtQuick
-import QtQuick.Layouts
-RowLayout {
+SplitPaneWithDetails {
id: root
required property Session session
anchors.fill: parent
- spacing: 0
-
- Item {
- Layout.preferredWidth: Math.floor(parent.width * 0.4)
- Layout.minimumWidth: 420
- Layout.fillHeight: true
-
- DeviceList {
- anchors.fill: parent
- anchors.margins: Appearance.padding.large + Appearance.padding.normal
- anchors.leftMargin: Appearance.padding.large
- anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
-
- session: root.session
- }
-
- InnerBorder {
- leftThickness: 0
- rightThickness: Appearance.padding.normal / 2
- }
+ activeItem: session.bt.active
+ paneIdGenerator: function(item) {
+ return item ? (item.address || "") : "";
}
- Item {
- Layout.fillWidth: true
- Layout.fillHeight: true
-
- ClippingRectangle {
- anchors.fill: parent
- anchors.margins: Appearance.padding.normal
- anchors.leftMargin: 0
- anchors.rightMargin: Appearance.padding.normal / 2
-
- radius: rightBorder.innerRadius
- color: "transparent"
+ leftContent: Component {
+ StyledFlickable {
+ id: leftFlickable
- Loader {
- id: loader
+ flickableDirection: Flickable.VerticalFlick
+ contentHeight: deviceList.height
- property BluetoothDevice pane: root.session.bt.active
-
- anchors.fill: parent
- anchors.margins: Appearance.padding.large * 2
+ StyledScrollBar.vertical: StyledScrollBar {
+ flickable: leftFlickable
+ }
- asynchronous: true
- sourceComponent: pane ? details : settings
+ DeviceList {
+ id: deviceList
- Behavior on pane {
- SequentialAnimation {
- ParallelAnimation {
- Anim {
- property: "opacity"
- to: 0
- easing.bezierCurve: Appearance.anim.curves.standardAccel
- }
- Anim {
- property: "scale"
- to: 0.8
- easing.bezierCurve: Appearance.anim.curves.standardAccel
- }
- }
- PropertyAction {}
- ParallelAnimation {
- Anim {
- property: "opacity"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- Anim {
- property: "scale"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- }
- }
- }
+ anchors.left: parent.left
+ anchors.right: parent.right
+ session: root.session
}
}
+ }
- InnerBorder {
- id: rightBorder
-
- leftThickness: Appearance.padding.normal / 2
+ rightDetailsComponent: Component {
+ Details {
+ session: root.session
}
+ }
- Component {
- id: settings
-
- StyledFlickable {
- flickableDirection: Flickable.VerticalFlick
- contentHeight: settingsInner.height
-
- Settings {
- id: settingsInner
+ rightSettingsComponent: Component {
+ StyledFlickable {
+ id: settingsFlickable
+ flickableDirection: Flickable.VerticalFlick
+ contentHeight: settingsInner.height
- anchors.left: parent.left
- anchors.right: parent.right
- session: root.session
- }
+ StyledScrollBar.vertical: StyledScrollBar {
+ flickable: settingsFlickable
}
- }
- Component {
- id: details
+ Settings {
+ id: settingsInner
- Details {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
session: root.session
}
}
}
-
- component Anim: NumberAnimation {
- target: loader
- duration: Appearance.anim.durations.normal / 2
- easing.type: Easing.BezierSpline
- }
}