From ef1b7cfd893792340da3272a2890eeff92664fc3 Mon Sep 17 00:00:00 2001 From: notiant <238434866+notiant@users.noreply.github.com> Date: Sun, 16 Nov 2025 11:05:25 +0100 Subject: [PATCH] Hide scrollbar in NListView if not necessary --- Modules/Panels/Settings/SettingsPanel.qml | 2 +- Widgets/NListView.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Panels/Settings/SettingsPanel.qml b/Modules/Panels/Settings/SettingsPanel.qml index 16633ff9..d0fbbfc4 100644 --- a/Modules/Panels/Settings/SettingsPanel.qml +++ b/Modules/Panels/Settings/SettingsPanel.qml @@ -411,7 +411,7 @@ SmartPanel { anchors.fill: parent anchors.margins: Style.marginS model: root.tabsModel - spacing: Style.marginXXS + spacing: Style.marginXS currentIndex: root.currentTabIndex verticalPolicy: ScrollBar.AsNeeded diff --git a/Widgets/NListView.qml b/Widgets/NListView.qml index 5fc13b90..1c2b6321 100644 --- a/Widgets/NListView.qml +++ b/Widgets/NListView.qml @@ -131,7 +131,7 @@ Item { implicitHeight: 100 radius: root.handleRadius color: parent.pressed ? root.handlePressedColor : parent.hovered ? root.handleHoverColor : root.handleColor - opacity: parent.policy === ScrollBar.AlwaysOn || parent.active ? 1.0 : 0.0 + opacity: parent.policy === ScrollBar.AlwaysOn ? 1.0 : root.verticalScrollBarActive ? (parent.active ? 1.0 : 0.0) : 0.0 Behavior on opacity { NumberAnimation { @@ -150,7 +150,7 @@ Item { implicitWidth: root.handleWidth implicitHeight: 100 color: root.trackColor - opacity: parent.policy === ScrollBar.AlwaysOn || parent.active ? 0.3 : 0.0 + opacity: parent.policy === ScrollBar.AlwaysOn ? 0.3 : root.verticalScrollBarActive ? (parent.active ? 0.3 : 0.0) : 0.0 radius: root.handleRadius / 2 Behavior on opacity {