Krolyxon
Commit 85941a2

Branches

Refs →

aurora.configquickshellwal-controlSliderRow.qml

30 lines · 706 B · QML

1import QtQuick
2import QtQuick.Layouts
3
4RowLayout {
5 id: r
6 property string icon: ""
7 property real value: 0
8 property bool muted: false
9 property string valueText: Math.round(value * 100) + "%"
10 signal moved(real v)
11 signal iconClicked()
12
13 spacing: 8
14
15 IconBtn { icon: r.icon; onClicked: r.iconClicked() }
16 BarSlider {
17 Layout.fillWidth: true
18 value: r.value
19 muted: r.muted
20 onMoved: v => r.moved(v)
21 }
22 Text {
23 text: r.valueText
24 Layout.preferredWidth: 40
25 horizontalAlignment: Text.AlignRight
26 color: r.muted ? Theme.dim : Theme.fg
27 font.family: Theme.font
28 font.pixelSize: Theme.fontSize
29 }
30}