b44d74c4212be3a849cc9b8df69eb71caa81bda6
[apps/mixer.git] / app / VolumeSlider.qml
1 import QtQuick 2.6
2 import QtQuick.Layouts 1.1
3 import QtQuick.Controls 2.0
4
5 RowLayout {
6         anchors.left: parent.left
7         anchors.right: parent.right
8         Layout.minimumHeight: 75
9
10         Label {
11                 font.pixelSize: 24
12                 text: modelData.name
13                 Layout.minimumWidth: 150
14                 Layout.maximumWidth: 150
15                 elide: Text.ElideRight
16         }
17         Label {
18                 font.pixelSize: 24
19                 text: modelData.value + " %"
20                 Layout.minimumWidth: 75
21                 Layout.maximumWidth: 75
22                 elide: Text.ElideRight
23         }
24         Slider {
25                 id: roleValueSlider
26                 Layout.fillWidth: true
27                 from: 0
28                 to: 100
29                 value: modelData.value
30                 stepSize: 1
31                 snapMode: Slider.SnapOnRelease
32         }
33
34         Binding {
35                 target: modelData
36                 property: "value"
37                 value: roleValueSlider.value
38         }
39 }