summaryrefslogtreecommitdiffstats
path: root/experimental/Media Player/VolumeControl.qml
blob: e814b993001340f5b89e1c10bb18d1fc6d4b8f31 (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
43
44
45

import QtQuick 2.0

Item {
    id: root
    width: 210
    height: volumeUp.height

    property alias volume: volumeSlider.value

    //Volume Controls
    ImageButton {
        id: volumeDown
        imageSource: "images/VolumeDown.png"
        anchors.verticalCenter: root.verticalCenter
        anchors.left: root.left
        scale: 1.4
        onClicked: {
            root.volume = 0.0;
        }
    }
    Slider {
        id: volumeSlider
        anchors.left: volumeDown.right
        anchors.leftMargin: 22
        anchors.rightMargin: 22
        anchors.right: volumeUp.left
        maximum: 1.0
        minimum: 0.0
        anchors.verticalCenter: root.verticalCenter
        anchors.verticalCenterOffset: 1
    }

    ImageButton {
        id: volumeUp
        imageSource: "images/VolumeUp.png"
        anchors.verticalCenter: root.verticalCenter
        anchors.verticalCenterOffset: 1
        anchors.right: root.right
        scale: 1.4
        onClicked: {
            root.volume = 1.0
        }
    }
}