summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-03 13:48:00 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-03 13:48:00 +1000
commit806c29a02f8f9c6884d68f28dfb2e867e3fa6eb7 (patch)
tree8bb5efd88bdcb05ae214dbcf165ec028858035b4
parentfiledialog: fix null error (diff)
downloadcaelestia-shell-806c29a02f8f9c6884d68f28dfb2e867e3fa6eb7.tar.gz
caelestia-shell-806c29a02f8f9c6884d68f28dfb2e867e3fa6eb7.tar.bz2
caelestia-shell-806c29a02f8f9c6884d68f28dfb2e867e3fa6eb7.zip
dcontent: add info to bt settings
Also flickable
-rw-r--r--modules/detachedcontent/bluetooth/BtPane.qml14
-rw-r--r--modules/detachedcontent/bluetooth/Settings.qml63
-rw-r--r--widgets/StyledFlickable.qml17
3 files changed, 88 insertions, 6 deletions
diff --git a/modules/detachedcontent/bluetooth/BtPane.qml b/modules/detachedcontent/bluetooth/BtPane.qml
index e72b1ab..ff2cc0a 100644
--- a/modules/detachedcontent/bluetooth/BtPane.qml
+++ b/modules/detachedcontent/bluetooth/BtPane.qml
@@ -54,11 +54,17 @@ RowLayout {
Component {
id: settings
- Settings {
- anchors.margins: Appearance.padding.normal
- anchors.leftMargin: Appearance.padding.normal / 2
+ StyledFlickable {
+ flickableDirection: Flickable.VerticalFlick
+ contentHeight: settingsInner.height
- session: root.session
+ Settings {
+ id: settingsInner
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ session: root.session
+ }
}
}
diff --git a/modules/detachedcontent/bluetooth/Settings.qml b/modules/detachedcontent/bluetooth/Settings.qml
index f0676c4..de5e6e7 100644
--- a/modules/detachedcontent/bluetooth/Settings.qml
+++ b/modules/detachedcontent/bluetooth/Settings.qml
@@ -448,8 +448,67 @@ ColumnLayout {
}
}
- Item {
- Layout.fillHeight: true
+ StyledText {
+ Layout.topMargin: Appearance.spacing.large
+ text: qsTr("Adapter information")
+ font.pointSize: Appearance.font.size.larger
+ font.weight: 500
+ }
+
+ StyledText {
+ text: qsTr("Information about the default adapter")
+ color: Colours.palette.m3outline
+ }
+
+ StyledRect {
+ Layout.fillWidth: true
+ implicitHeight: adapterInfo.implicitHeight + Appearance.padding.large * 2
+
+ radius: Appearance.rounding.normal
+ color: Colours.palette.m3surfaceContainer
+
+ ColumnLayout {
+ id: adapterInfo
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: Appearance.padding.large
+
+ spacing: Appearance.spacing.small / 2
+
+ StyledText {
+ text: qsTr("Adapter state")
+ }
+
+ StyledText {
+ text: Bluetooth.defaultAdapter ? BluetoothAdapterState.toString(Bluetooth.defaultAdapter.state) : qsTr("Unknown")
+ color: Colours.palette.m3outline
+ font.pointSize: Appearance.font.size.small
+ }
+
+ StyledText {
+ Layout.topMargin: Appearance.spacing.normal
+ text: qsTr("Dbus path")
+ }
+
+ StyledText {
+ text: Bluetooth.defaultAdapter?.dbusPath ?? ""
+ color: Colours.palette.m3outline
+ font.pointSize: Appearance.font.size.small
+ }
+
+ StyledText {
+ Layout.topMargin: Appearance.spacing.normal
+ text: qsTr("Adapter id")
+ }
+
+ StyledText {
+ text: Bluetooth.defaultAdapter?.adapterId ?? ""
+ color: Colours.palette.m3outline
+ font.pointSize: Appearance.font.size.small
+ }
+ }
}
component Toggle: RowLayout {
diff --git a/widgets/StyledFlickable.qml b/widgets/StyledFlickable.qml
new file mode 100644
index 0000000..7b2a75e
--- /dev/null
+++ b/widgets/StyledFlickable.qml
@@ -0,0 +1,17 @@
+import qs.config
+import QtQuick
+
+Flickable {
+ id: root
+
+ maximumFlickVelocity: 3000
+
+ rebound: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ duration: Appearance.anim.durations.normal
+ easing.type: Easing.BezierSpline
+ easing.bezierCurve: Appearance.anim.curves.standard
+ }
+ }
+}