[gnome-weather] Do not draw background behind hourly forecast chart



commit 9c746649f7b4d3c6f4f5874c3e953a2da04e6b41
Author: Vitaly Dyachkov <obyknovenius me com>
Date:   Tue Mar 9 18:21:53 2021 +0100

    Do not draw background behind hourly forecast chart

 data/application.css      |  1 -
 src/app/hourlyForecast.js | 28 +---------------------------
 2 files changed, 1 insertion(+), 28 deletions(-)
---
diff --git a/data/application.css b/data/application.css
index 7cc0f88..7044732 100644
--- a/data/application.css
+++ b/data/application.css
@@ -48,7 +48,6 @@
     color: #2174d9;
 }
 
-@define-color temp_chart_background_color @theme_base_color;
 @define-color temp_chart_fill_color rgba(248, 228, 92, 0.5);
 @define-color temp_chart_stroke_color rgba(246, 211, 45, 1.0);
 
diff --git a/src/app/hourlyForecast.js b/src/app/hourlyForecast.js
index 5b5fd51..a0ab406 100644
--- a/src/app/hourlyForecast.js
+++ b/src/app/hourlyForecast.js
@@ -155,40 +155,14 @@ var HourlyForecastBox = GObject.registerClass(class HourlyForecastBox extends Gt
 
         const spacing = 18;
 
-        const borderRadius = 9;
-
         const graphMinY = lineWidth / 2 + entryImageY + entryImageHeight + spacing;
         const graphMaxY = height - lineWidth / 2 - spacing - entryTemperatureLabelHeight - spacing;
         const graphHeight = graphMaxY - graphMinY;
 
-        const arc0 = 0.0;
-        const arc1 = Math.PI * 0.5
-        const arc2 = Math.PI;
-        const arc3 = Math.PI * 1.5
-
-        let x = 0;
-        let y = 0;
-
-        cr.newSubPath();
-        cr.arc(x + width - borderRadius, y + borderRadius, borderRadius, arc3, arc0);
-        cr.arc(x + width - borderRadius, y + height - borderRadius, borderRadius, arc0, arc1);
-        cr.arc(x + borderRadius, y + height - borderRadius, borderRadius, arc1, arc2);
-        cr.arc(x + borderRadius, y + borderRadius, borderRadius, arc2, arc3);
-        cr.closePath();
-
-        cr.clip();
-        cr.fill();
-
-        let [, backgroundColor] = this.get_style_context().lookup_color('temp_chart_background_color');
-        Gdk.cairo_set_source_rgba(cr, backgroundColor);
-
-        cr.rectangle(0, 0, width, height);
-        cr.fill();
-
         let [, strokeColor] = this.get_style_context().lookup_color('temp_chart_stroke_color');
         Gdk.cairo_set_source_rgba(cr, strokeColor);
 
-        x = 0;
+        let x = 0;
         cr.moveTo (x, graphMinY + ((1 - values[0]) * graphHeight));
 
         x += entryWidth / 2;


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