From ff51677daa9041455034e89f5ad1bd23dbb17b0d Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sat, 24 Sep 2022 17:34:57 -0400 Subject: [PATCH] quicksettings: Fix scrollview indicators --- .../quicksettings/QuickSettings.qml | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml index 25d14e4c..c81356c3 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml @@ -224,19 +224,6 @@ Item { width: parent.width height: rowCount * rowHeight - PlasmaComponents.ScrollView { - enabled: pageSize <= quickSettingsCount - - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - ScrollBar.vertical.policy: ScrollBar.AlwaysOff - ScrollBar.vertical.interactive: false - - anchors.fill: parent - contentWidth: width - contentHeight: height - contentItem: flickable - } - Flickable { id: flickable anchors.fill: parent @@ -246,16 +233,23 @@ Item { clip: true ScrollIndicator.vertical: ScrollIndicator { - active: true - + id: scrollIndicator visible: quickSettingsCount > pageSize ? true : false - position: 0.1 - contentItem: Rectangle { + contentItem: Item { implicitWidth: PlasmaCore.Units.smallSpacing / 4 - color: PlasmaCore.Theme.textColor - opacity: 0.5 + Rectangle { + // shift over the indicator a bit to the right + anchors.fill: parent + anchors.leftMargin: 2 + anchors.rightMargin: -2 + + color: PlasmaCore.Theme.textColor + opacity: scrollIndicator.active ? 0.5 : 0 + + Behavior on opacity { NumberAnimation {} } + } } }