audio popout changes, slider inset icons added
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 9s
Python / lint-format (pull_request) Successful in 15s
Python / test (pull_request) Successful in 27s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m1s

This commit is contained in:
2026-06-08 01:22:37 +02:00
parent 1f9630ed76
commit 628c4b32a5
5 changed files with 336 additions and 194 deletions
+18 -14
View File
@@ -1,6 +1,6 @@
import qs.Config
import QtQuick
import QtQuick.Templates
import qs.Config
ScrollBar {
id: root
@@ -12,7 +12,7 @@ ScrollBar {
property real nonAnimPosition
property bool shouldBeActive
implicitWidth: 8
implicitWidth: mouse.containsMouse ? Appearance.padding.extraSmall * 2 : Appearance.padding.extraSmall
contentItem: CustomRect {
anchors.left: parent.left
@@ -33,6 +33,7 @@ ScrollBar {
Behavior on opacity {
Anim {
type: Anim.DefaultEffects
}
}
@@ -40,9 +41,16 @@ ScrollBar {
id: mouse
acceptedButtons: Qt.NoButton
anchors.fill: parent
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.top: parent.top
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
implicitWidth: Appearance.padding.extraSmall * 2
}
}
Behavior on implicitWidth {
Anim {
}
}
Behavior on position {
@@ -86,23 +94,19 @@ ScrollBar {
// Sync nonAnimPosition with flickable when not animating
Connections {
function onContentYChanged() {
if (!animating && !fullMouse.pressed) {
_updatingFromFlickable = true;
const contentHeight = flickable.contentHeight;
const height = flickable.height;
if (!root.animating && !fullMouse.pressed) {
root._updatingFromFlickable = true;
const contentHeight = root.flickable.contentHeight;
const height = root.flickable.height;
if (contentHeight > height) {
nonAnimPosition = Math.max(0, Math.min(1, flickable.contentY / (contentHeight - height)));
root.nonAnimPosition = Math.max(0, Math.min(1, root.flickable.contentY / (contentHeight - height)));
} else {
nonAnimPosition = 0;
root.nonAnimPosition = 0;
}
_updatingFromFlickable = false;
root._updatingFromFlickable = false;
}
}
target: flickable
}
Connections {
function onMovingChanged(): void {
if (root.flickable.moving)
root.shouldBeActive = true;