summaryrefslogtreecommitdiffstats
path: root/app/VolumeSlider.qml
blob: b44d74c4212be3a849cc9b8df69eb71caa81bda6 (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
import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0

RowLayout {
	anchors.left: parent.left
	anchors.right: parent.right
	Layout.minimumHeight: 75

	Label {
		font.pixelSize: 24
		text: modelData.name
		Layout.minimumWidth: 150
		Layout.maximumWidth: 150
		elide: Text.ElideRight
	}
	Label {
		font.pixelSize: 24
		text: modelData.value + " %"
		Layout.minimumWidth: 75
		Layout.maximumWidth: 75
		elide: Text.ElideRight
	}
	Slider {
		id: roleValueSlider
		Layout.fillWidth: true
		from: 0
		to: 100
		value: modelData.value
		stepSize: 1
		snapMode: Slider.SnapOnRelease
	}

	Binding {
		target: modelData
		property: "value"
		value: roleValueSlider.value
	}
}