controlcenter: corrections on scrolling in panes and missing scrollbars

This commit is contained in:
ATMDA 2025-11-17 08:09:32 -05:00
parent 9bd3d57ff5
commit c2c04b8637
6 changed files with 43 additions and 8 deletions

View file

@ -1,6 +1,7 @@
pragma ComponentBehavior: Bound pragma ComponentBehavior: Bound
import ".." import ".."
import qs.components.controls
import qs.components.effects import qs.components.effects
import qs.components.containers import qs.components.containers
import qs.config import qs.config
@ -131,14 +132,20 @@ RowLayout {
id: settings id: settings
StyledFlickable { StyledFlickable {
id: settingsFlickable
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: settingsInner.height contentHeight: settingsInner.height
StyledScrollBar.vertical: StyledScrollBar {
flickable: settingsFlickable
}
Settings { Settings {
id: settingsInner id: settingsInner
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
session: root.session session: root.session
} }
} }

View file

@ -18,11 +18,13 @@ StyledFlickable {
required property Session session required property Session session
readonly property BluetoothDevice device: session.bt.active readonly property BluetoothDevice device: session.bt.active
anchors.fill: parent
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: layoutWrapper.height contentHeight: layoutWrapper.height
StyledScrollBar.vertical: StyledScrollBar {
flickable: root
}
Item { Item {
id: layoutWrapper id: layoutWrapper

View file

@ -284,8 +284,12 @@ ColumnLayout {
CustomSpinBox { CustomSpinBox {
min: 0 min: 0
value: root.session.bt.currentAdapter.discoverableTimeout value: root.session.bt.currentAdapter?.discoverableTimeout ?? 0
onValueModified: value => root.session.bt.currentAdapter.discoverableTimeout = value onValueModified: value => {
if (root.session.bt.currentAdapter) {
root.session.bt.currentAdapter.discoverableTimeout = value;
}
}
} }
} }
@ -345,7 +349,7 @@ ColumnLayout {
anchors.top: renameLabel.bottom anchors.top: renameLabel.bottom
anchors.leftMargin: root.session.bt.editingAdapterName ? 0 : -Appearance.padding.normal anchors.leftMargin: root.session.bt.editingAdapterName ? 0 : -Appearance.padding.normal
text: root.session.bt.currentAdapter.name text: root.session.bt.currentAdapter?.name ?? ""
readOnly: !root.session.bt.editingAdapterName readOnly: !root.session.bt.editingAdapterName
onAccepted: { onAccepted: {
root.session.bt.editingAdapterName = false; root.session.bt.editingAdapterName = false;
@ -392,7 +396,7 @@ ColumnLayout {
function onClicked(): void { function onClicked(): void {
root.session.bt.editingAdapterName = false; root.session.bt.editingAdapterName = false;
adapterNameEdit.text = Qt.binding(() => root.session.bt.currentAdapter.name); adapterNameEdit.text = Qt.binding(() => root.session.bt.currentAdapter?.name ?? "");
} }
} }

View file

@ -16,7 +16,8 @@ Item {
required property Session session required property Session session
readonly property var device: session.ethernet.active readonly property var device: session.ethernet.active
anchors.fill: parent implicitWidth: layout.implicitWidth
implicitHeight: layout.implicitHeight
Component.onCompleted: { Component.onCompleted: {
if (device && device.interface) { if (device && device.interface) {
@ -37,6 +38,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
ConnectionHeader { ConnectionHeader {

View file

@ -518,14 +518,20 @@ Item {
id: settings id: settings
StyledFlickable { StyledFlickable {
id: settingsFlickable
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: settingsInner.height contentHeight: settingsInner.height
StyledScrollBar.vertical: StyledScrollBar {
flickable: settingsFlickable
}
NetworkSettings { NetworkSettings {
id: settingsInner id: settingsInner
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
session: root.session session: root.session
} }
} }
@ -535,14 +541,20 @@ Item {
id: ethernetDetails id: ethernetDetails
StyledFlickable { StyledFlickable {
id: ethernetFlickable
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: ethernetDetailsInner.height contentHeight: ethernetDetailsInner.height
StyledScrollBar.vertical: StyledScrollBar {
flickable: ethernetFlickable
}
EthernetDetails { EthernetDetails {
id: ethernetDetailsInner id: ethernetDetailsInner
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
session: root.session session: root.session
} }
} }
@ -552,14 +564,20 @@ Item {
id: wirelessDetails id: wirelessDetails
StyledFlickable { StyledFlickable {
id: wirelessFlickable
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
contentHeight: wirelessDetailsInner.height contentHeight: wirelessDetailsInner.height
StyledScrollBar.vertical: StyledScrollBar {
flickable: wirelessFlickable
}
WirelessDetails { WirelessDetails {
id: wirelessDetailsInner id: wirelessDetailsInner
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
session: root.session session: root.session
} }
} }

View file

@ -17,7 +17,8 @@ Item {
required property Session session required property Session session
readonly property var network: session.network.active readonly property var network: session.network.active
anchors.fill: parent implicitWidth: layout.implicitWidth
implicitHeight: layout.implicitHeight
Component.onCompleted: { Component.onCompleted: {
updateDeviceDetails(); updateDeviceDetails();
@ -105,6 +106,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
ConnectionHeader { ConnectionHeader {