fix(@desktop/settings): Fix precision of volume
Also move soundtrack in assets and reuse audio component
This commit is contained in:
parent
e68d06462d
commit
4c55ad26bb
|
@ -24,7 +24,7 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 24
|
anchors.leftMargin: 24
|
||||||
//% "Sound volume"
|
//% "Sound volume"
|
||||||
text: qsTrId("sound-volume") + " " + volume.value
|
text: qsTrId("sound-volume") + " " + volume.value.toPrecision(1)
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import QtQuick.Layouts 1.13
|
||||||
import QtMultimedia 5.13
|
import QtMultimedia 5.13
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import "../sounds"
|
|
||||||
import "../shared"
|
import "../shared"
|
||||||
import "../shared/status"
|
import "../shared/status"
|
||||||
import "../shared/popups"
|
import "../shared/popups"
|
||||||
|
@ -151,24 +150,19 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorSound {
|
Audio {
|
||||||
id: errorSound
|
id: errorSound
|
||||||
|
track: "error.mp3"
|
||||||
}
|
}
|
||||||
|
|
||||||
Audio {
|
Audio {
|
||||||
id: sendMessageSound
|
id: sendMessageSound
|
||||||
audioRole: Audio.NotificationRole
|
track: "send_message.wav"
|
||||||
source: "../../../../sounds/send_message.wav"
|
|
||||||
volume: appSettings.volume
|
|
||||||
muted: !appSettings.notificationSoundsEnabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Audio {
|
Audio {
|
||||||
id: notificationSound
|
id: notificationSound
|
||||||
audioRole: Audio.NotificationRole
|
track: "notification.wav"
|
||||||
source: "../../../../sounds/notification.wav"
|
|
||||||
volume: appSettings.volume
|
|
||||||
muted: !appSettings.notificationSoundsEnabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ModuleWarning {
|
ModuleWarning {
|
||||||
|
|
|
@ -2,15 +2,12 @@ import QtQuick 2.13
|
||||||
import QtMultimedia 5.13
|
import QtMultimedia 5.13
|
||||||
|
|
||||||
Audio {
|
Audio {
|
||||||
id: errorSound
|
id: audio
|
||||||
source: "./error.mp3"
|
|
||||||
|
property string track: "error.mp3"
|
||||||
|
|
||||||
|
source: Qt.resolvedUrl("./../assets/audio" + track)
|
||||||
audioRole: Audio.NotificationRole
|
audioRole: Audio.NotificationRole
|
||||||
volume: appSettings.volume
|
volume: appSettings.volume
|
||||||
muted: !appSettings.notificationSoundsEnabled
|
muted: !appSettings.notificationSoundsEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
/*##^##
|
|
||||||
Designer {
|
|
||||||
D{i:0;autoSize:true;height:480;width:640}
|
|
||||||
}
|
|
||||||
##^##*/
|
|
|
@ -5,3 +5,4 @@ singleton Config 1.0 Config.qml
|
||||||
singleton Constants 1.0 Constants.qml
|
singleton Constants 1.0 Constants.qml
|
||||||
singleton SelectedMessage 1.0 SelectedMessage.qml
|
singleton SelectedMessage 1.0 SelectedMessage.qml
|
||||||
singleton Backpressure 1.0 Backpressure/Backpressure.qml
|
singleton Backpressure 1.0 Backpressure/Backpressure.qml
|
||||||
|
Audio 1.0 Audio.qml
|
||||||
|
|
|
@ -13,7 +13,6 @@ import DotherSide 0.1
|
||||||
|
|
||||||
import "./app/AppLayouts/Onboarding/views"
|
import "./app/AppLayouts/Onboarding/views"
|
||||||
import "./app"
|
import "./app"
|
||||||
import "./sounds"
|
|
||||||
import "./shared"
|
import "./shared"
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ErrorSound 1.0 ErrorSound.qml
|
|
Loading…
Reference in New Issue