Commit 03528a97 authored by Nate Graham's avatar Nate Graham
Browse files

[OSD] Colorize percentage text when over 100%

We've now made it easier to increase the maximum volume to 150% for
those who need it due to quiet speakers. However since this could
potentially lead to excessive volume or damage to loud speakers with
long-term use, let's colorize the text to subtly indicate that this is
not a normal state.
parent ade3bc4a
......@@ -70,6 +70,20 @@ RowLayout {
verticalAlignment: Text.AlignVCenter
text: i18nc("Percentage value", "%1%", progressBar.value)
visible: rootItem.showingProgress
// Display a subtle visual indication that the volume might be
// dangerously high
// ------------------------------------------------
// Keep this in sync with the copies in plasma-pa:ListItemBase.qml
// and plasma-pa:VolumeSlider.qml
color: {
if (progressBar.value <= 100) {
return theme.textColor
} else if (progressBar.value > 100 && progressBar.value <= 125) {
return theme.neutralTextColor
} else {
return theme.negativeTextColor
PlasmaExtra.Heading {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment