wip
This commit is contained in:
parent
32edcff102
commit
0296117901
110 changed files with 9713 additions and 5 deletions
34
widgets/StyledScrollBar.qml
Normal file
34
widgets/StyledScrollBar.qml
Normal file
|
@ -0,0 +1,34 @@
|
|||
import "root:/services"
|
||||
import "root:/config"
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
ScrollBar {
|
||||
id: root
|
||||
|
||||
contentItem: StyledRect {
|
||||
implicitWidth: 6
|
||||
opacity: root.pressed ? 1 : root.policy === ScrollBar.AlwaysOn || (root.active && root.size < 1) ? 0.8 : 0
|
||||
radius: Appearance.rounding.full
|
||||
color: Colours.palette.m3secondary
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
z: -1
|
||||
anchors.fill: parent
|
||||
onWheel: event => {
|
||||
if (event.angleDelta.y > 0)
|
||||
root.decrease();
|
||||
else if (event.angleDelta.y < 0)
|
||||
root.increase();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue