From 096f8ec9b6f79438a45b19889385ae4d9340c0a8 Mon Sep 17 00:00:00 2001 From: APTX Date: Mon, 21 Feb 2022 22:45:45 +0900 Subject: [PATCH] Volume slider updates Show volume percentage. Draw slider in orange when volume is over 100%. --- uiplugins/ui_desktop_qml_default/qml/VolumeSlider.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/uiplugins/ui_desktop_qml_default/qml/VolumeSlider.qml b/uiplugins/ui_desktop_qml_default/qml/VolumeSlider.qml index 5e68d5f..571f151 100644 --- a/uiplugins/ui_desktop_qml_default/qml/VolumeSlider.qml +++ b/uiplugins/ui_desktop_qml_default/qml/VolumeSlider.qml @@ -8,7 +8,7 @@ Item { Rectangle { id: heard - color: "#00B000" + color: volume <= 1.0 ? "#00B000" : "orange" anchors.left: parent.left anchors.top: parent.top anchors.bottom: parent.bottom @@ -26,6 +26,12 @@ Item { anchors.bottom: parent.bottom } + Text { + id: currentVolumeText + anchors.centerIn: parent + text: Math.round(volume * 100) + "%" + } + MouseArea { id: ma anchors.fill: parent -- 2.52.0