Using NScrollView and NListView where it matters.

Not using them in tiny ListViews (ex: NComboBox, and Media player
dropdown)
This commit is contained in:
LemmyCook 2025-09-11 17:58:28 -04:00
parent 4067896434
commit 2872a7b5c9
7 changed files with 23 additions and 19 deletions

View file

@ -108,12 +108,12 @@ NPanel {
} }
} }
ScrollView { NScrollView {
visible: BluetoothService.adapter && BluetoothService.adapter.enabled visible: BluetoothService.adapter && BluetoothService.adapter.enabled
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff horizontalPolicy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AsNeeded verticalPolicy: ScrollBar.AsNeeded
clip: true clip: true
contentWidth: availableWidth contentWidth: availableWidth

View file

@ -281,9 +281,12 @@ NPanel {
} }
// Results list // Results list
ListView { NListView {
id: resultsList id: resultsList
horizontalPolicy: ScrollBar.AlwaysOff
verticalPolicy: ScrollBar.AsNeeded
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
spacing: Style.marginXXS * scaling spacing: Style.marginXXS * scaling
@ -300,10 +303,6 @@ NPanel {
} }
} }
ScrollBar.vertical: ScrollBar {
policy: ScrollBar.AsNeeded
}
delegate: Rectangle { delegate: Rectangle {
id: entry id: entry

View file

@ -115,10 +115,13 @@ NPanel {
} }
// Notification list // Notification list
ListView { NListView {
id: notificationList id: notificationList
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
horizontalPolicy: ScrollBar.AlwaysOff
verticalPolicy: ScrollBar.AsNeeded
model: NotificationService.historyModel model: NotificationService.historyModel
spacing: Style.marginM * scaling spacing: Style.marginM * scaling
clip: true clip: true

View file

@ -115,10 +115,12 @@ ColumnLayout {
} }
// Icon grid // Icon grid
ScrollView { NScrollView {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
clip: true clip: true
horizontalPolicy: ScrollBar.AlwaysOff
verticalPolicy: ScrollBar.AlwaysOn
GridView { GridView {
id: grid id: grid

View file

@ -517,11 +517,11 @@ NPanel {
anchors.fill: parent anchors.fill: parent
pressDelay: 200 pressDelay: 200
ScrollView { NScrollView {
id: scrollView id: scrollView
anchors.fill: parent anchors.fill: parent
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff horizontalPolicy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AsNeeded verticalPolicy: ScrollBar.AsNeeded
padding: Style.marginL * scaling padding: Style.marginL * scaling
clip: true clip: true

View file

@ -185,12 +185,12 @@ NPanel {
} }
// Networks list container // Networks list container
ScrollView { NScrollView {
visible: Settings.data.network.wifiEnabled && (!NetworkService.scanning || Object.keys( visible: Settings.data.network.wifiEnabled && (!NetworkService.scanning || Object.keys(
NetworkService.networks).length > 0) NetworkService.networks).length > 0)
anchors.fill: parent anchors.fill: parent
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff horizontalPolicy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AsNeeded verticalPolicy: ScrollBar.AsNeeded
clip: true clip: true
ColumnLayout { ColumnLayout {

View file

@ -110,12 +110,12 @@ Popup {
border.width: Math.max(1, Style.borderM * scaling) border.width: Math.max(1, Style.borderM * scaling)
} }
ScrollView { NScrollView {
id: scrollView id: scrollView
anchors.fill: parent anchors.fill: parent
ScrollBar.vertical.policy: ScrollBar.AlwaysOff verticalPolicy: ScrollBar.AlwaysOff
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff horizontalPolicy: ScrollBar.AlwaysOff
clip: true clip: true
ColumnLayout { ColumnLayout {