From faaba1066f314baf248b7874abf8679818886dcc Mon Sep 17 00:00:00 2001 From: Baris Date: Wed, 3 Sep 2025 01:33:04 +0200 Subject: [PATCH] refactor: introduce minimumScrollBarWidth and minimumScrollBarThumbSize as part of the style Signed-off-by: Baris --- src/gui/tray/ActivityList.qml | 4 ++-- theme/Style/Style.qml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/tray/ActivityList.qml b/src/gui/tray/ActivityList.qml index 1a9e110776..e2e43c3492 100644 --- a/src/gui/tray/ActivityList.qml +++ b/src/gui/tray/ActivityList.qml @@ -38,8 +38,8 @@ ScrollView { ScrollBar.horizontal.policy: ScrollBar.AlwaysOff ScrollBar.vertical.policy: ScrollBar.AlwaysOn - ScrollBar.vertical.width: Math.max(ScrollBar.vertical.implicitWidth, controlRoot.width * 0.03) - ScrollBar.vertical.minimumSize: 0.05 + ScrollBar.vertical.width: Math.max(ScrollBar.vertical.implicitWidth, Style.minimumScrollBarWidth) + ScrollBar.vertical.minimumSize: Style.minimumScrollBarThumbSize data: NC.WheelHandler { target: controlRoot.contentItem diff --git a/theme/Style/Style.qml b/theme/Style/Style.qml index e8597e13e0..98856f8c8e 100644 --- a/theme/Style/Style.qml +++ b/theme/Style/Style.qml @@ -70,6 +70,8 @@ QtObject { property int minActivityHeight: variableSize(32) + property int minimumScrollBarWidth: 12 + property real minimumScrollBarThumbSize: 0 property int currentAccountButtonWidth: 220 property int currentAccountButtonRadius: 2 property int currentAccountLabelWidth: 128