lena_pi/LenaPi/VolumeSlider.qml
2021-03-14 14:42:32 +01:00

31 lines
809 B
QML

import QtQuick 2.0
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
ColumnLayout {
property alias from: slider.from
property alias to: slider.to
property alias stepSize: slider.stepSize
property alias value: slider.value
spacing: 5
RoundImageButton{
id: increaseButton
imageSource: "qrc:///icon_increase_volume"
onClicked: slider.increase();
}
Slider{
id: slider
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter
orientation: Qt.Vertical
from: 34 // we cannot hear anything if lower than 35%
to: 100
stepSize: 1
value: 50
}
RoundImageButton{
id: decreaseButton
imageSource: "qrc:///icon_decrease_volume"
onClicked: slider.decrease();
}
}