2020-07-21 21:03:22 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
import StatusQ.Core 0.1
|
2021-11-01 09:27:19 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-10-22 12:48:52 +00:00
|
|
|
import StatusQ.Controls 0.1
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2020-07-21 21:03:22 +00:00
|
|
|
Item {
|
|
|
|
id: soundsContainer
|
2021-12-09 13:28:02 +00:00
|
|
|
|
|
|
|
property var store
|
|
|
|
property int profileContentWidth
|
|
|
|
|
2020-09-23 18:01:33 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2021-04-08 15:44:58 +00:00
|
|
|
clip: true
|
2020-07-21 21:03:22 +00:00
|
|
|
|
2021-03-18 09:33:39 +00:00
|
|
|
Item {
|
2021-12-09 13:28:02 +00:00
|
|
|
width: profileContentWidth
|
2021-04-08 15:44:58 +00:00
|
|
|
|
2021-03-18 09:33:39 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-09-17 10:18:16 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2021-03-18 09:33:39 +00:00
|
|
|
id: labelVolume
|
2021-03-24 17:44:35 +00:00
|
|
|
anchors.top: parent.top
|
2021-03-24 17:46:34 +00:00
|
|
|
anchors.topMargin: 24
|
2021-03-18 09:33:39 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
//% "Sound volume"
|
2021-10-11 12:41:42 +00:00
|
|
|
text: qsTrId("sound-volume") + " " + volume.value.toPrecision(1)
|
2021-03-18 09:33:39 +00:00
|
|
|
font.pixelSize: 15
|
2021-11-01 09:27:19 +00:00
|
|
|
color: Theme.palette.directColor1
|
2021-03-18 09:33:39 +00:00
|
|
|
}
|
2020-09-17 10:18:16 +00:00
|
|
|
|
2021-03-18 09:33:39 +00:00
|
|
|
StatusSlider {
|
|
|
|
id: volume
|
|
|
|
anchors.top: labelVolume.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
2021-10-22 12:48:52 +00:00
|
|
|
from: 0.0
|
|
|
|
to: 1.0
|
2021-03-18 09:33:39 +00:00
|
|
|
stepSize: 0.1
|
|
|
|
onValueChanged: {
|
2022-02-09 17:35:59 +00:00
|
|
|
localAccountSensitiveSettings.volume = volume.value * 10
|
2021-03-18 09:33:39 +00:00
|
|
|
}
|
2022-01-11 23:16:17 +00:00
|
|
|
|
|
|
|
Component.onCompleted: {
|
2022-02-09 17:35:59 +00:00
|
|
|
value = localAccountSensitiveSettings.volume * 0.1
|
2022-01-11 23:16:17 +00:00
|
|
|
}
|
2020-09-17 10:18:16 +00:00
|
|
|
}
|
|
|
|
}
|
2020-07-21 21:03:22 +00:00
|
|
|
}
|