osdWindow: Allow levels above 100%

Allow osd representing levels that can be more than 100% by accepting
an optional parameter setting that maximum level.
gnome-settings-daemon will use this to indicate volume levels above 100%,
which our own volume indicator will soon support as well.
This commit is contained in:
Didier Roche
2018-07-31 16:47:05 +02:00
committed by Florian Müllner
parent 3f756dc608
commit aa75e89216
2 changed files with 26 additions and 6 deletions

View File

@ -148,12 +148,13 @@ var GnomeShell = new Lang.Class({
let monitorIndex = params['monitor'] || -1;
let label = params['label'] || undefined;
let level = params['level'] || undefined;
let maxLevel = params['max_level'] || undefined;
let icon = null;
if (params['icon'])
icon = Gio.Icon.new_for_string(params['icon']);
Main.osdWindowManager.show(monitorIndex, icon, label, level);
Main.osdWindowManager.show(monitorIndex, icon, label, level, maxLevel);
},
FocusApp(id) {