[gnome-weather] Fix bug when chart's background color overwrites it's border color
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather] Fix bug when chart's background color overwrites it's border color
- Date: Fri, 4 Sep 2020 16:07:21 +0000 (UTC)
commit 17a26d1998be711bb3df06ed6e1c88504df14257
Author: Vitaly Dyachkov <obyknovenius me com>
Date: Tue Sep 1 17:39:25 2020 +0200
Fix bug when chart's background color overwrites it's border color
src/app/hourlyForecast.js | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/app/hourlyForecast.js b/src/app/hourlyForecast.js
index 6e41633..0ae7ddc 100644
--- a/src/app/hourlyForecast.js
+++ b/src/app/hourlyForecast.js
@@ -161,12 +161,6 @@ var HourlyForecastFrame = GObject.registerClass(class ForecastFrame extends Gtk.
const graphMaxY = frameHeight - frameBorderWidth - lineWidth / 2 - spacing -
entryTemperatureLabelHeight - spacing;
const graphHeight = graphMaxY - graphMinY;
- let [, borderColor] = this.get_style_context().lookup_color('temp_graph_border_color');
- Gdk.cairo_set_source_rgba(cr, borderColor);
- cr.setLineWidth(lineWidth);
-
- let [, backgroundColor] = this.get_style_context().lookup_color('temp_graph_background_color');
- Gdk.cairo_set_source_rgba(cr, backgroundColor);
let x = 0;
cr.moveTo (x, graphMinY + ((1 - values[0]) * graphHeight));
@@ -179,11 +173,19 @@ var HourlyForecastFrame = GObject.registerClass(class ForecastFrame extends Gtk.
}
cr.lineTo(frameWidth, graphMinY + ((1 - values[values.length - 1]) * graphHeight));
- cr.strokePreserve();
+ let [, borderColor] = this.get_style_context().lookup_color('temp_graph_border_color');
+ Gdk.cairo_set_source_rgba(cr, borderColor);
+
+ cr.setLineWidth(lineWidth);
+ cr.strokePreserve();
cr.lineTo(frameWidth, frameHeight);
cr.lineTo(0, frameHeight);
+
+ let [, backgroundColor] = this.get_style_context().lookup_color('temp_graph_background_color');
+ Gdk.cairo_set_source_rgba(cr, backgroundColor);
+
cr.fill();
cr.$dispose();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]