blob: ba9d842a1e728a8ecb0b24b1c28ab003dc10ec04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Item {
id: Slider; width: 400; height: 16
property var value: Handle.x / Slider.xMax
property int xMax: Slider.width - Handle.width - 2
property int imageWidth
property int imageHeight
Rect {
id: Container; anchors.fill: parent; gradientColor: "#66000000";
pen.color: "white"; pen.width: 1; color: "#66343434"; radius: 8
}
Rect {
id: Handle
x: Slider.width / 2 - Handle.width / 2; y: 2; width: 30; height: 12
color: "lightgray"; gradientColor: "gray"; radius: 6
MouseRegion {
anchors.fill: parent; drag.target: parent
drag.axis: "x"; drag.xmin: 2; drag.xmax: Slider.xMax
}
}
}
|