From: APTX Date: Mon, 21 Feb 2022 13:45:45 +0000 (+0900) Subject: Volume slider updates X-Git-Url: https://gitweb.aptx.org/?a=commitdiff_plain;h=096f8ec9b6f79438a45b19889385ae4d9340c0a8;p=aniplayer.git Volume slider updates Show volume percentage. Draw slider in orange when volume is over 100%. --- 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