[gnome-weather] Remove small conditions image



commit 154111326671c64e83820eed3842c173cc3405fa
Author: Vitaly Dyachkov <obyknovenius me com>
Date:   Thu Oct 29 17:29:23 2020 +0100

    Remove small conditions image

 data/weather-widget.ui | 35 ++++++++---------------------------
 src/app/city.js        | 14 +-------------
 2 files changed, 9 insertions(+), 40 deletions(-)
---
diff --git a/data/weather-widget.ui b/data/weather-widget.ui
index 4413778..ba159d9 100644
--- a/data/weather-widget.ui
+++ b/data/weather-widget.ui
@@ -133,34 +133,15 @@
                 <property name="can_focus">False</property>
                 <property name="column_spacing">10</property>
                 <child>
-                  <object class="HdySqueezer" id="conditionsSqueezer">
+                  <object class="GtkImage" id="conditionsImage">
+                    <property name="name">conditions-image</property>
                     <property name="visible">True</property>
-                    <property name="homogeneous">False</property>
-                    <property name="transition-type">crossfade</property>
-                    <child>
-                      <object class="GtkImage" id="conditionsImage">
-                        <property name="name">conditions-image</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">center</property>
-                        <style>
-                          <class name="icon-dropshadow"/>
-                        </style>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImage" id="conditionsImageSmall">
-                        <property name="name">conditions-image-small</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="valign">center</property>
-                        <style>
-                          <class name="icon-dropshadow"/>
-                        </style>
-                      </object>
-                    </child>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="valign">center</property>
+                    <style>
+                      <class name="icon-dropshadow"/>
+                    </style>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
diff --git a/src/app/city.js b/src/app/city.js
index f989e83..2abf4d9 100644
--- a/src/app/city.js
+++ b/src/app/city.js
@@ -139,8 +139,7 @@ function get_icon_resources(info) {
 var WeatherWidget = GObject.registerClass({
     Template: 'resource:///org/gnome/Weather/weather-widget.ui',
     InternalChildren: ['contentFrame', 'outerGrid',
-                       'conditionsImage', 'conditionsImageSmall',
-                       'placesButton', 'placesLabel',
+                       'conditionsImage', 'placesButton', 'placesLabel',
                        'temperatureLabel', 'apparentLabel',
                        'forecastStack','leftButton', 'rightButton',
                        'forecast-hourly', 'forecast-hourly-viewport',
@@ -305,17 +304,6 @@ var WeatherWidget = GObject.registerClass({
 
         this._worldView.refilter();
 
-        this._conditionsImage.clear();
-        this._conditionsImageSmall.clear();
-
-        try {
-            const [resource, resourceSmall] = get_icon_resources(info);
-            this._conditionsImage.set_from_resource(resource);
-            this._conditionsImageSmall.set_from_resource(resourceSmall);
-        } catch (err) {
-            log(`Failed to set weather icon from resource: ${err}`);
-        }
-
         const [, tempValue] = info.get_value_temp(GWeather.TemperatureUnit.DEFAULT);
         this._temperatureLabel.label = '%.0f°'.format(tempValue);
 


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