Fix temperatures being rounded down instead of to the closest integer

This commit is contained in:
Jonas Malaco
2019-03-02 10:08:25 -03:00
parent 88567ab5c2
commit dd635f2948

View File

@@ -610,8 +610,7 @@ var FreonMenuButton = new Lang.Class({
} }
let format = '%.1f'; let format = '%.1f';
if (!this._settings.get_boolean('show-decimal-value')){ if (!this._settings.get_boolean('show-decimal-value')){
//ret = Math.round(value); format = '%.0f';
format = '%d';
} }
format += '%s'; format += '%s';
return format.format(value, (this._settings.get_string('unit')=='fahrenheit') ? "\u00b0F" : "\u00b0C"); return format.format(value, (this._settings.get_string('unit')=='fahrenheit') ? "\u00b0F" : "\u00b0C");