From 2872a7b5c94a368a2b3430639c9cb576a437310e Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Thu, 11 Sep 2025 17:58:28 -0400 Subject: [PATCH] Using NScrollView and NListView where it matters. Not using them in tiny ListViews (ex: NComboBox, and Media player dropdown) --- Modules/BluetoothPanel/BluetoothPanel.qml | 6 +++--- Modules/Launcher/Launcher.qml | 9 ++++----- Modules/Notification/NotificationHistoryPanel.qml | 5 ++++- .../Bar/WidgetSettings/CustomButtonSettings.qml | 4 +++- Modules/SettingsPanel/SettingsPanel.qml | 6 +++--- Modules/WiFiPanel/WiFiPanel.qml | 6 +++--- Widgets/NColorPickerDialog.qml | 6 +++--- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/Modules/BluetoothPanel/BluetoothPanel.qml b/Modules/BluetoothPanel/BluetoothPanel.qml index ac78db3..8c6d6ea 100644 --- a/Modules/BluetoothPanel/BluetoothPanel.qml +++ b/Modules/BluetoothPanel/BluetoothPanel.qml @@ -108,12 +108,12 @@ NPanel { } } - ScrollView { + NScrollView { visible: BluetoothService.adapter && BluetoothService.adapter.enabled Layout.fillWidth: true Layout.fillHeight: true - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - ScrollBar.vertical.policy: ScrollBar.AsNeeded + horizontalPolicy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AsNeeded clip: true contentWidth: availableWidth diff --git a/Modules/Launcher/Launcher.qml b/Modules/Launcher/Launcher.qml index e299fb7..8789ee2 100644 --- a/Modules/Launcher/Launcher.qml +++ b/Modules/Launcher/Launcher.qml @@ -281,9 +281,12 @@ NPanel { } // Results list - ListView { + NListView { id: resultsList + horizontalPolicy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AsNeeded + Layout.fillWidth: true Layout.fillHeight: true spacing: Style.marginXXS * scaling @@ -300,10 +303,6 @@ NPanel { } } - ScrollBar.vertical: ScrollBar { - policy: ScrollBar.AsNeeded - } - delegate: Rectangle { id: entry diff --git a/Modules/Notification/NotificationHistoryPanel.qml b/Modules/Notification/NotificationHistoryPanel.qml index 0d440a4..cc09436 100644 --- a/Modules/Notification/NotificationHistoryPanel.qml +++ b/Modules/Notification/NotificationHistoryPanel.qml @@ -115,10 +115,13 @@ NPanel { } // Notification list - ListView { + NListView { id: notificationList Layout.fillWidth: true Layout.fillHeight: true + horizontalPolicy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AsNeeded + model: NotificationService.historyModel spacing: Style.marginM * scaling clip: true diff --git a/Modules/SettingsPanel/Bar/WidgetSettings/CustomButtonSettings.qml b/Modules/SettingsPanel/Bar/WidgetSettings/CustomButtonSettings.qml index 0516ab2..b6a5d32 100644 --- a/Modules/SettingsPanel/Bar/WidgetSettings/CustomButtonSettings.qml +++ b/Modules/SettingsPanel/Bar/WidgetSettings/CustomButtonSettings.qml @@ -115,10 +115,12 @@ ColumnLayout { } // Icon grid - ScrollView { + NScrollView { Layout.fillWidth: true Layout.fillHeight: true clip: true + horizontalPolicy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AlwaysOn GridView { id: grid diff --git a/Modules/SettingsPanel/SettingsPanel.qml b/Modules/SettingsPanel/SettingsPanel.qml index 0883db0..edf61d6 100644 --- a/Modules/SettingsPanel/SettingsPanel.qml +++ b/Modules/SettingsPanel/SettingsPanel.qml @@ -517,11 +517,11 @@ NPanel { anchors.fill: parent pressDelay: 200 - ScrollView { + NScrollView { id: scrollView anchors.fill: parent - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - ScrollBar.vertical.policy: ScrollBar.AsNeeded + horizontalPolicy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AsNeeded padding: Style.marginL * scaling clip: true diff --git a/Modules/WiFiPanel/WiFiPanel.qml b/Modules/WiFiPanel/WiFiPanel.qml index cd66140..abdad6d 100644 --- a/Modules/WiFiPanel/WiFiPanel.qml +++ b/Modules/WiFiPanel/WiFiPanel.qml @@ -185,12 +185,12 @@ NPanel { } // Networks list container - ScrollView { + NScrollView { visible: Settings.data.network.wifiEnabled && (!NetworkService.scanning || Object.keys( NetworkService.networks).length > 0) anchors.fill: parent - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - ScrollBar.vertical.policy: ScrollBar.AsNeeded + horizontalPolicy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AsNeeded clip: true ColumnLayout { diff --git a/Widgets/NColorPickerDialog.qml b/Widgets/NColorPickerDialog.qml index cc246c6..dbc2223 100644 --- a/Widgets/NColorPickerDialog.qml +++ b/Widgets/NColorPickerDialog.qml @@ -110,12 +110,12 @@ Popup { border.width: Math.max(1, Style.borderM * scaling) } - ScrollView { + NScrollView { id: scrollView anchors.fill: parent - ScrollBar.vertical.policy: ScrollBar.AlwaysOff - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + verticalPolicy: ScrollBar.AlwaysOff + horizontalPolicy: ScrollBar.AlwaysOff clip: true ColumnLayout {