Files
qyouvideo/QYRComponents/Slider.qml

56 lines
1.2 KiB
QML
Raw Normal View History

2025-10-11 02:30:58 +02:00
import QtQuick 6.8
import QtQuick.Controls 6.8
import QtQuick.Controls.Basic 6.8
2025-10-11 02:30:58 +02:00
Slider {
2025-10-11 02:30:58 +02:00
snapMode: Slider.SnapAlways
2025-10-19 02:58:12 +02:00
property real buffered
2025-10-11 02:30:58 +02:00
implicitWidth: 130
implicitHeight: 20
2025-10-14 13:36:21 +02:00
// OpacityAnimator on opacity{
// from: 0.7
// to: 1
// duration: 200
// target: parent
// running: parent.hovered
// }
// OpacityAnimator on opacity{
// from: 1
// to: 0.7
// duration: 200
// target: parent
// running: !parent.hovered
// }
2025-10-11 02:30:58 +02:00
background: Rectangle {
color: "#555"
radius: 5
2025-10-19 02:58:12 +02:00
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
visible: parent.parent.buffered != 0
width: parent.width * parent.parent.buffered
color: "#888"
radius: 5
}
2025-10-11 02:30:58 +02:00
}
handle: Rectangle {
2025-10-11 17:55:56 +02:00
x: parent.leftPadding + parent.visualPosition * (parent.availableWidth - width)
y: parent.topPadding + parent.availableHeight / 2 - height / 2
2025-10-11 02:30:58 +02:00
width: 20
height: 20
radius: 10
color: Colors.primary
border.color: "#999"
border.width: parent.focused ? 3 : 0
2025-10-11 02:30:58 +02:00
}
}