dateMenu: Don't ellipsize forecast times and temps

While those should be concise enough to fit, they may not where
temperatures drop into double-digit negatives. It seems better
to accept some awkward horizontal scrolling in that case than
shorten relevant information.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1926
This commit is contained in:
Florian Müllner 2019-11-20 23:15:55 +01:00
parent e72c38b5ab
commit 95f388b9a7

View File

@ -2,7 +2,7 @@
/* exported DateMenuButton */
const { Clutter, Gio, GLib, GnomeDesktop,
GObject, GWeather, Shell, St } = imports.gi;
GObject, GWeather, Pango, Shell, St } = imports.gi;
const Util = imports.misc.util;
const Main = imports.ui.main;
@ -366,6 +366,9 @@ class WeatherSection extends St.Button {
x_align: Clutter.ActorAlign.CENTER,
});
temp.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
time.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
layout.attach(icon, col, 0, 1, 1);
layout.attach(temp, col, 1, 1, 1);
layout.attach(time, col, 2, 1, 1);