-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathControlSlider.qml
More file actions
40 lines (36 loc) · 1.07 KB
/
ControlSlider.qml
File metadata and controls
40 lines (36 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import QtQuick 2.0
import QtQuick.Controls 2.12
Slider {
id:mainSlider
property string title: "slider"
handle: Rectangle {
x: mainSlider.leftPadding + mainSlider.visualPosition * (mainSlider.availableWidth - width)
y: mainSlider.topPadding + mainSlider.availableHeight / 2 - height / 2
implicitWidth: 26
implicitHeight: 26
radius: 13
color: mainSlider.pressed ? "#f0f0f0" : "#f6f6f6"
border.color: "#bdbebf"
}
background: Rectangle {
x: mainSlider.leftPadding
y: mainSlider.topPadding + mainSlider.availableHeight / 2 - height / 2
implicitWidth: 200
implicitHeight: 4
width: mainSlider.availableWidth
height: implicitHeight
radius: 2
color: "#bdbebf"
Rectangle {
width: mainSlider.visualPosition * parent.width
height: parent.height
color: "#21be2b"
radius: 2
}
Text {
text: qsTr(title)
x: mainSlider.width/2 - (width/2)
y: 15
}
}
}