blob: bcc57a4ca1404b573784a1d019616e85741826a8 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
import QtQuick.Controls
Window {
width: slider.implicitWidth
height: slider.implicitHeight
visible: true
property alias slider: slider
Slider {
id: slider
stepSize: 0.2
anchors.centerIn: parent
Rectangle {
anchors.fill: slider.handle
radius: width / 2
color: slider.pressed ? "#aa666666" : "transparent"
}
contentItem: Item {
Repeater {
id: repeater
model: 6
Rectangle {
x: ((slider.contentItem.width - slider.handle.width) * (index / (repeater.count - 1)))
- width / 2 + slider.handle.width / 2
y: parent.height
width: 1
height: 4
color: "#888"
}
}
}
}
}
|