scrollbar: show gutter + enable scrolling

This commit is contained in:
2 * r + 2 * t 2025-05-02 20:58:49 +10:00
parent 03a484dd4a
commit 1d942b0737

View file

@ -6,11 +6,25 @@ ScrollBar {
id: root
contentItem: StyledRect {
opacity: 0
radius: Appearance.rounding.full
color: Qt.alpha(Appearance.colours.m3secondary, 0.5)
color: Qt.alpha(Appearance.colours.m3secondary, 0.6)
}
background: StyledRect {
implicitWidth: 10
opacity: 0
radius: Appearance.rounding.full
color: Qt.alpha(Appearance.colours.m3surfaceContainerLow, 0.4)
MouseArea {
anchors.fill: parent
onWheel: event => {
if (event.angleDelta.y > 0)
root.decrease();
else if (event.angleDelta.y < 0)
root.increase();
}
}
}
}