From c2c04b86379c222b5d0e0f123b12713e7a82366e Mon Sep 17 00:00:00 2001 From: ATMDA Date: Mon, 17 Nov 2025 08:09:32 -0500 Subject: controlcenter: corrections on scrolling in panes and missing scrollbars --- modules/controlcenter/bluetooth/BtPane.qml | 7 +++++++ modules/controlcenter/bluetooth/Details.qml | 6 ++++-- modules/controlcenter/bluetooth/Settings.qml | 12 ++++++++---- modules/controlcenter/network/EthernetDetails.qml | 4 +++- modules/controlcenter/network/NetworkingPane.qml | 18 ++++++++++++++++++ modules/controlcenter/network/WirelessDetails.qml | 4 +++- 6 files changed, 43 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/controlcenter/bluetooth/BtPane.qml b/modules/controlcenter/bluetooth/BtPane.qml index 32d2c0d..8ad4b1f 100644 --- a/modules/controlcenter/bluetooth/BtPane.qml +++ b/modules/controlcenter/bluetooth/BtPane.qml @@ -1,6 +1,7 @@ pragma ComponentBehavior: Bound import ".." +import qs.components.controls import qs.components.effects import qs.components.containers import qs.config @@ -131,14 +132,20 @@ RowLayout { id: settings StyledFlickable { + id: settingsFlickable flickableDirection: Flickable.VerticalFlick contentHeight: settingsInner.height + StyledScrollBar.vertical: StyledScrollBar { + flickable: settingsFlickable + } + Settings { id: settingsInner anchors.left: parent.left anchors.right: parent.right + anchors.top: parent.top session: root.session } } diff --git a/modules/controlcenter/bluetooth/Details.qml b/modules/controlcenter/bluetooth/Details.qml index 7ac5286..883b408 100644 --- a/modules/controlcenter/bluetooth/Details.qml +++ b/modules/controlcenter/bluetooth/Details.qml @@ -18,11 +18,13 @@ StyledFlickable { required property Session session readonly property BluetoothDevice device: session.bt.active - anchors.fill: parent - flickableDirection: Flickable.VerticalFlick contentHeight: layoutWrapper.height + StyledScrollBar.vertical: StyledScrollBar { + flickable: root + } + Item { id: layoutWrapper diff --git a/modules/controlcenter/bluetooth/Settings.qml b/modules/controlcenter/bluetooth/Settings.qml index fd33af9..c8453b6 100644 --- a/modules/controlcenter/bluetooth/Settings.qml +++ b/modules/controlcenter/bluetooth/Settings.qml @@ -284,8 +284,12 @@ ColumnLayout { CustomSpinBox { min: 0 - value: root.session.bt.currentAdapter.discoverableTimeout - onValueModified: value => root.session.bt.currentAdapter.discoverableTimeout = value + value: root.session.bt.currentAdapter?.discoverableTimeout ?? 0 + onValueModified: value => { + if (root.session.bt.currentAdapter) { + root.session.bt.currentAdapter.discoverableTimeout = value; + } + } } } @@ -345,7 +349,7 @@ ColumnLayout { anchors.top: renameLabel.bottom 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 onAccepted: { root.session.bt.editingAdapterName = false; @@ -392,7 +396,7 @@ ColumnLayout { function onClicked(): void { root.session.bt.editingAdapterName = false; - adapterNameEdit.text = Qt.binding(() => root.session.bt.currentAdapter.name); + adapterNameEdit.text = Qt.binding(() => root.session.bt.currentAdapter?.name ?? ""); } } diff --git a/modules/controlcenter/network/EthernetDetails.qml b/modules/controlcenter/network/EthernetDetails.qml index c16eb9d..7c2534a 100644 --- a/modules/controlcenter/network/EthernetDetails.qml +++ b/modules/controlcenter/network/EthernetDetails.qml @@ -16,7 +16,8 @@ Item { required property Session session readonly property var device: session.ethernet.active - anchors.fill: parent + implicitWidth: layout.implicitWidth + implicitHeight: layout.implicitHeight Component.onCompleted: { if (device && device.interface) { @@ -37,6 +38,7 @@ Item { anchors.left: parent.left anchors.right: parent.right + anchors.top: parent.top spacing: Appearance.spacing.normal ConnectionHeader { diff --git a/modules/controlcenter/network/NetworkingPane.qml b/modules/controlcenter/network/NetworkingPane.qml index 680e495..d00916c 100644 --- a/modules/controlcenter/network/NetworkingPane.qml +++ b/modules/controlcenter/network/NetworkingPane.qml @@ -518,14 +518,20 @@ Item { id: settings StyledFlickable { + id: settingsFlickable flickableDirection: Flickable.VerticalFlick contentHeight: settingsInner.height + StyledScrollBar.vertical: StyledScrollBar { + flickable: settingsFlickable + } + NetworkSettings { id: settingsInner anchors.left: parent.left anchors.right: parent.right + anchors.top: parent.top session: root.session } } @@ -535,14 +541,20 @@ Item { id: ethernetDetails StyledFlickable { + id: ethernetFlickable flickableDirection: Flickable.VerticalFlick contentHeight: ethernetDetailsInner.height + StyledScrollBar.vertical: StyledScrollBar { + flickable: ethernetFlickable + } + EthernetDetails { id: ethernetDetailsInner anchors.left: parent.left anchors.right: parent.right + anchors.top: parent.top session: root.session } } @@ -552,14 +564,20 @@ Item { id: wirelessDetails StyledFlickable { + id: wirelessFlickable flickableDirection: Flickable.VerticalFlick contentHeight: wirelessDetailsInner.height + StyledScrollBar.vertical: StyledScrollBar { + flickable: wirelessFlickable + } + WirelessDetails { id: wirelessDetailsInner anchors.left: parent.left anchors.right: parent.right + anchors.top: parent.top session: root.session } } diff --git a/modules/controlcenter/network/WirelessDetails.qml b/modules/controlcenter/network/WirelessDetails.qml index 6b7cb15..09abff3 100644 --- a/modules/controlcenter/network/WirelessDetails.qml +++ b/modules/controlcenter/network/WirelessDetails.qml @@ -17,7 +17,8 @@ Item { required property Session session readonly property var network: session.network.active - anchors.fill: parent + implicitWidth: layout.implicitWidth + implicitHeight: layout.implicitHeight Component.onCompleted: { updateDeviceDetails(); @@ -105,6 +106,7 @@ Item { anchors.left: parent.left anchors.right: parent.right + anchors.top: parent.top spacing: Appearance.spacing.normal ConnectionHeader { -- cgit v1.2.3-freya