[gnome-weather/gnome-42] ui: Ellipsize city label
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather/gnome-42] ui: Ellipsize city label
- Date: Sun, 29 May 2022 22:31:12 +0000 (UTC)
commit 8db8f8b67f44bd19323e5db79fb5b7fd8246bb1a
Author: Vitaly Dyachkov <obyknovenius me com>
Date: Fri May 27 19:53:39 2022 +0200
ui: Ellipsize city label
data/style.css | 4 ----
data/weather-widget.ui | 8 +++-----
src/app/city.js | 3 ++-
3 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/data/style.css b/data/style.css
index 02a4e85..f592951 100644
--- a/data/style.css
+++ b/data/style.css
@@ -8,10 +8,6 @@
@define-color weather_thermometer_low_color @blue_5;
@define-color weather_forecast_color #ae7b03;
-#places-label {
- font-weight: bold;
-}
-
#temperature-label {
font-size: 32pt;
font-weight: 900;
diff --git a/data/weather-widget.ui b/data/weather-widget.ui
index 361d5bf..9b0c7f7 100644
--- a/data/weather-widget.ui
+++ b/data/weather-widget.ui
@@ -34,14 +34,12 @@
<property name="halign">start</property>
<property name="valign">start</property>
<property name="always-show-arrow">True</property>
- <property name="child">
+ <child>
<object class="GtkLabel" id="placesLabel">
- <property name="name">places-label</property>
- <property name="wrap">true</property>
- <property name="wrap-mode">word-char</property>
<property name="label" translatable="yes">Places</property>
+ <property name="ellipsize">end</property>
</object>
- </property>
+ </child>
<style>
<class name="text-button"/>
<class name="flat"/>
diff --git a/src/app/city.js b/src/app/city.js
index 1804443..9d55e0b 100644
--- a/src/app/city.js
+++ b/src/app/city.js
@@ -37,6 +37,7 @@ export const WeatherWidget = GObject.registerClass({
InternalChildren: [
'conditionsImage',
'placesButton',
+ 'placesLabel',
'temperatureLabel',
'apparentLabel',
'forecastStack',
@@ -190,7 +191,7 @@ export const WeatherWidget = GObject.registerClass({
this._info = info;
const label = Util.getNameAndCountry(info.location);
- this._placesButton.set_label(label.join(', '));
+ this._placesLabel.set_label(label.join(', '));
this._worldView.refilter();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]