summaryrefslogtreecommitdiff
path: root/modules/osd/Content.qml
blob: daab4e266bdb0788fe8d5901818a57fe0178ac60 (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
import "root:/widgets"
import "root:/services"
import "root:/config"
import Quickshell
import QtQuick

Column {
    id: root

    required property ShellScreen screen

    padding: Appearance.padding.large

    anchors.verticalCenter: parent.verticalCenter
    anchors.right: parent.right

    spacing: Appearance.spacing.normal

    VerticalSlider {
        icon: {
            if (Audio.muted)
                return "no_sound";
            if (value >= 0.5)
                return "volume_up";
            if (value > 0)
                return "volume_down";
            return "volume_mute";
        }
        value: Audio.volume
        onMoved: Audio.setVolume(value)

        implicitWidth: OsdConfig.sizes.sliderWidth
        implicitHeight: OsdConfig.sizes.sliderHeight
    }

    VerticalSlider {
        icon: "brightness_6"

        implicitWidth: OsdConfig.sizes.sliderWidth
        implicitHeight: OsdConfig.sizes.sliderHeight
    }
}