[gnome-weather/wip/ewlsh/gtk4] Cleanup.
- From: Evan Welsh <ewlsh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather/wip/ewlsh/gtk4] Cleanup.
- Date: Wed, 6 Jan 2021 00:20:05 +0000 (UTC)
commit 3ab2e9974b959fb65aae56670b75ad04c30549a1
Author: Evan Welsh <contact evanwelsh com>
Date: Tue Jan 5 16:20:00 2021 -0800
Cleanup.
data/day-entry.ui | 4 ++--
src/app/city.js | 15 +++++++++------
src/app/window.js | 8 ++++++--
3 files changed, 17 insertions(+), 10 deletions(-)
---
diff --git a/data/day-entry.ui b/data/day-entry.ui
index d5c0c6f..3ac6bc3 100644
--- a/data/day-entry.ui
+++ b/data/day-entry.ui
@@ -247,10 +247,10 @@
<template class="Gjs_DayEntry" parent="GtkBox">
<property name="width_request">100</property>
<property name="height_request">200</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
<property name="margin_top">18</property>
<property name="margin_bottom">18</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child>
diff --git a/src/app/city.js b/src/app/city.js
index 8380bc1..d253562 100644
--- a/src/app/city.js
+++ b/src/app/city.js
@@ -44,11 +44,13 @@ var WeatherWidget = GObject.registerClass({
'forecast-daily', 'forecast-daily-viewport',
'updatedTimeLabel', 'attributionLabel'],
}, class WeatherWidget extends Gtk.Widget {
+ _init(params) {
+ const { application, window, ...parentParams } = params;
- _init(application, window, params) {
- super._init(Object.assign({
+ super._init({
+ ...parentParams,
name: 'weather-page'
- }, params));
+ });
this._info = null;
@@ -282,10 +284,11 @@ var WeatherView = GObject.registerClass({
InternalChildren: ['spinner']
}, class WeatherView extends Gtk.Stack {
- _init(application, window, params) {
- super._init(params);
+ _init(params) {
+ const { application, window, ...parentParams } = params;
+ super._init(parentParams);
- this._infoPage = new WeatherWidget(application, window);
+ this._infoPage = new WeatherWidget({ application, window });
this.add_named(this._infoPage, 'info');
this._info = null;
diff --git a/src/app/window.js b/src/app/window.js
index 68b127a..8793339 100644
--- a/src/app/window.js
+++ b/src/app/window.js
@@ -95,8 +95,12 @@ var MainWindow = GObject.registerClass(
this._stack = builder.get_object('main-stack');
- this._cityView = new City.WeatherView(this.application, this, { hexpand: true,
- vexpand: true });
+ this._cityView = new City.WeatherView({
+ application: this.application,
+ window: this,
+ hexpand: true,
+ vexpand: true
+ });
this._stack.add_child(this._cityView);
this._forecastStackSwitcher = builder.get_object('switcher-title');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]