mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 09:48:50 +00:00
quicksettings: Fix scrollview indicators
This commit is contained in:
parent
83d63a2e3a
commit
ff51677daa
1 changed files with 13 additions and 19 deletions
|
|
@ -224,19 +224,6 @@ Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: rowCount * rowHeight
|
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 {
|
Flickable {
|
||||||
id: flickable
|
id: flickable
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -246,16 +233,23 @@ Item {
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
ScrollIndicator.vertical: ScrollIndicator {
|
ScrollIndicator.vertical: ScrollIndicator {
|
||||||
active: true
|
id: scrollIndicator
|
||||||
|
|
||||||
visible: quickSettingsCount > pageSize ? true : false
|
visible: quickSettingsCount > pageSize ? true : false
|
||||||
|
|
||||||
position: 0.1
|
position: 0.1
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: Item {
|
||||||
implicitWidth: PlasmaCore.Units.smallSpacing / 4
|
implicitWidth: PlasmaCore.Units.smallSpacing / 4
|
||||||
|
Rectangle {
|
||||||
|
// shift over the indicator a bit to the right
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: 2
|
||||||
|
anchors.rightMargin: -2
|
||||||
|
|
||||||
color: PlasmaCore.Theme.textColor
|
color: PlasmaCore.Theme.textColor
|
||||||
opacity: 0.5
|
opacity: scrollIndicator.active ? 0.5 : 0
|
||||||
|
|
||||||
|
Behavior on opacity { NumberAnimation {} }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue