[gnome-weather] Round temperature values when showing them on hourly chart



commit 7d27337fc0e026288635fb579257b00024b2d971
Author: Vitaly Dyachkov <obyknovenius me com>
Date:   Tue Sep 1 17:21:18 2020 +0200

    Round temperature values when showing them on hourly chart
    
    Temperature values are already rounded when we show them as text. For a
    consistency, we now round them too when representing them as a chart.

 src/app/hourlyForecast.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/app/hourlyForecast.js b/src/app/hourlyForecast.js
index 98cd431..6e41633 100644
--- a/src/app/hourlyForecast.js
+++ b/src/app/hourlyForecast.js
@@ -136,7 +136,7 @@ var HourlyForecastFrame = GObject.registerClass(class ForecastFrame extends Gtk.
     vfunc_draw(cr) {
         super.vfunc_draw(cr);
 
-        const temps = this._hourlyInfo.map(info => Util.getTemp(info));
+        const temps = this._hourlyInfo.map(info => Math.round(Util.getTemp(info)));
 
         const maxTemp = Math.max(...temps);
         const minTemp = Math.min(...temps);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]