dcontent: add info to bt settings
Also flickable
This commit is contained in:
parent
1ee4d188c7
commit
806c29a02f
3 changed files with 88 additions and 6 deletions
|
|
@ -54,13 +54,19 @@ RowLayout {
|
||||||
Component {
|
Component {
|
||||||
id: settings
|
id: settings
|
||||||
|
|
||||||
Settings {
|
StyledFlickable {
|
||||||
anchors.margins: Appearance.padding.normal
|
flickableDirection: Flickable.VerticalFlick
|
||||||
anchors.leftMargin: Appearance.padding.normal / 2
|
contentHeight: settingsInner.height
|
||||||
|
|
||||||
|
Settings {
|
||||||
|
id: settingsInner
|
||||||
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
session: root.session
|
session: root.session
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: details
|
id: details
|
||||||
|
|
|
||||||
|
|
@ -448,8 +448,67 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
StyledText {
|
||||||
Layout.fillHeight: true
|
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 {
|
component Toggle: RowLayout {
|
||||||
|
|
|
||||||
17
widgets/StyledFlickable.qml
Normal file
17
widgets/StyledFlickable.qml
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue