launcher: fix scrollbar
This commit is contained in:
parent
e34ce82297
commit
e3a27ec90b
2 changed files with 29 additions and 12 deletions
|
|
@ -48,7 +48,7 @@ PaddedRect {
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: qsTr(root.modelData.comment || root.modelData.genericName || root.modelData.name)
|
text: root.modelData.comment || root.modelData.genericName || root.modelData.name
|
||||||
font.pointSize: Appearance.font.size.small
|
font.pointSize: Appearance.font.size.small
|
||||||
color: Appearance.alpha(Appearance.colours.m3outline, true)
|
color: Appearance.alpha(Appearance.colours.m3outline, true)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,18 +6,36 @@ ScrollBar {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
contentItem: StyledRect {
|
contentItem: StyledRect {
|
||||||
opacity: 0
|
opacity: root.pressed ? 0.8 : root.policy === ScrollBar.AlwaysOn || (root.active && root.size < 1) ? 0.6 : 0
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
color: Qt.alpha(Appearance.colours.m3secondary, 0.6)
|
color: Appearance.colours.m3secondary
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Appearance.anim.durations.normal
|
||||||
|
easing.type: Easing.BezierSpline
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: StyledRect {
|
background: StyledRect {
|
||||||
implicitWidth: 10
|
implicitWidth: 10
|
||||||
opacity: 0
|
opacity: root.policy === ScrollBar.AlwaysOn || (root.active && root.size < 1) ? 0.4 : 0
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
color: Qt.alpha(Appearance.colours.m3surfaceContainerLow, 0.4)
|
color: Appearance.colours.m3surfaceContainerLow
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Appearance.anim.durations.normal
|
||||||
|
easing.type: Easing.BezierSpline
|
||||||
|
easing.bezierCurve: Appearance.anim.curves.standard
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
z: -1
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onWheel: event => {
|
onWheel: event => {
|
||||||
if (event.angleDelta.y > 0)
|
if (event.angleDelta.y > 0)
|
||||||
|
|
@ -27,4 +45,3 @@ ScrollBar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue