[gnome-weather] Make chart background white
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather] Make chart background white
- Date: Fri, 7 Aug 2020 15:49:49 +0000 (UTC)
commit c7f9faca9fec5b6b11f73641206e2c0777e9bdc3
Author: Vitaly Dyachkov <obyknovenius me com>
Date: Fri Aug 7 17:08:38 2020 +0200
Make chart background white
data/application.css | 4 ++++
src/app/dailyForecast.js | 3 +++
src/app/hourlyForecast.js | 6 +++++-
3 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/data/application.css b/data/application.css
index ff809e2..1069748 100644
--- a/data/application.css
+++ b/data/application.css
@@ -49,6 +49,10 @@
border: 1px solid @borders;
}
+.forecast-frame {
+ background-color: white;
+}
+
.forecast-temperature-label {
font-weight: bold;
color: #c89009;
diff --git a/src/app/dailyForecast.js b/src/app/dailyForecast.js
index 223ca81..89b16a2 100644
--- a/src/app/dailyForecast.js
+++ b/src/app/dailyForecast.js
@@ -30,8 +30,11 @@ var DailyForecastFrame = GObject.registerClass(class DailyForecastFrame extends
shadow_type: Gtk.ShadowType.IN,
name: 'daily-forecast-frame',
}, params));
+
this.get_accessible().accessible_name = _('Daily Forecast');
+ this.get_style_context().add_class("forecast-frame");
+
this._box = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL,
spacing: 0});
this.add(this._box);
diff --git a/src/app/hourlyForecast.js b/src/app/hourlyForecast.js
index f23dc72..20aee18 100644
--- a/src/app/hourlyForecast.js
+++ b/src/app/hourlyForecast.js
@@ -35,8 +35,11 @@ var HourlyForecastFrame = GObject.registerClass(class ForecastFrame extends Gtk.
shadow_type: Gtk.ShadowType.IN,
name: 'hourly-forecast-frame',
}, params));
+
this.get_accessible().accessible_name = _('Hourly Forecast');
+ this.get_style_context().add_class("forecast-frame");
+
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
this._box = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL,
@@ -131,6 +134,8 @@ var HourlyForecastFrame = GObject.registerClass(class ForecastFrame extends Gtk.
}
vfunc_draw(cr) {
+ super.vfunc_draw(cr);
+
let hourlyInfo = this._hourlyInfo;
let temps = hourlyInfo.map(info => Util.getTemp(info));
@@ -165,7 +170,6 @@ var HourlyForecastFrame = GObject.registerClass(class ForecastFrame extends Gtk.
cr.fill();
- super.vfunc_draw(cr);
cr.$dispose();
return Gdk.EVENT_PROPAGATE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]