Applet: Add Raise maximum volume action to context menu
ClosedPublic

Authored by drosca on Mar 17 2017, 3:33 PM.

Details

Summary

Allows to raise maximum volume to 150% only for selected stream.

Test Plan

Works as described.
There is a visual bug when raising volume, setting volume to 150% (maximum) and then disabling the volume raise (the maximum value goes back to 100%) - the slider will grow in width, but that looks like issue in slider itself.

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
drosca created this revision.Mar 17 2017, 3:33 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 17 2017, 3:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
drosca updated this revision to Diff 12564.Mar 17 2017, 3:46 PM

Fix stepSize

Zren added a subscriber: Zren.Mar 23 2017, 1:10 AM

Looks good.

There's one issue I want to point out that I dealt with, is that other instances of the widget won't be in the "raised" state (eg: other screens).

Example: https://streamable.com/go1u7

My solution was:
https://github.com/Zren/plasma-applets/blob/master/org.kde.plasma.volumewin7mixer/package/contents/ui/MixerItem.qml#L372-L379

property int volume: PulseObject.volume
onVolumeChanged: {
    ignoreValueChange = true;
    if (!mixerItem.isVolumeBoosted && PulseObject.volume > maximumValue) {
        mixerItem.isVolumeBoosted = true;
    }
    value = PulseObject.volume;
    ignoreValueChange = false;
}

There's one issue I want to point out that I dealt with, is that other instances of the widget won't be in the "raised" state (eg: other screens).

Multiple instances have also separate settings, so I don't see this as an issue.

However, it is possible that other apps raise volume above 100% (eg. vlc) and you won't be able to change it (only lower down to maximum - 100% or according to applet settings), so this should be taken care of (raise temporarily as long as the value is above maximum). But this should go in another commit.

davidedmundson accepted this revision.May 2 2017, 11:18 AM
This revision is now accepted and ready to land.May 2 2017, 11:18 AM
This revision was automatically updated to reflect the committed changes.