osdWindow: Use float values as input for osdWindow
Using the same type/interval as BarLevel means we can cut out the intermediate LevelBar class in a follow-up cleanup. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/385
This commit is contained in:
@ -94,6 +94,12 @@ var GnomeShell = class {
|
||||
if (serializedIcon)
|
||||
icon = Gio.Icon.new_for_string(serializedIcon);
|
||||
|
||||
// Translate from percentages in the D-Bus API to floats
|
||||
if (!isNaN(level))
|
||||
level /= 100;
|
||||
if (!isNaN(maxLevel))
|
||||
maxLevel /= 100;
|
||||
|
||||
Main.osdWindowManager.show(monitorIndex, icon, label, level, maxLevel);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user