[gnome-shell] dateMenu: Move weather forecast time above icon
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dateMenu: Move weather forecast time above icon
- Date: Thu, 9 Jan 2020 16:24:16 +0000 (UTC)
commit 6233d87e5b8776759a52fbe120a03420639a398e
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Dec 19 00:43:12 2019 +0100
dateMenu: Move weather forecast time above icon
The time is de-emphasized like the header, grouping them together
helps to further accentuate the more important information.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1143
data/theme/gnome-shell-sass/widgets/_calendar.scss | 14 +++++++-------
js/ui/dateMenu.js | 16 ++++++++--------
2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/widgets/_calendar.scss
b/data/theme/gnome-shell-sass/widgets/_calendar.scss
index fcd4448add..a1dbe87316 100644
--- a/data/theme/gnome-shell-sass/widgets/_calendar.scss
+++ b/data/theme/gnome-shell-sass/widgets/_calendar.scss
@@ -218,6 +218,13 @@
spacing-columns: $base_spacing * 2;
}
+ .weather-forecast-time {
+ color: darken($fg_color,30%);
+ font-feature-settings: "tnum";
+ @include fontsize($base_font_size - 2);
+ font-weight: normal;
+ }
+
.weather-forecast-icon {
icon-size: $base_icon_size * 2;
}
@@ -225,13 +232,6 @@
.weather-forecast-temp {
font-weight: bold;
}
-
- .weather-forecast-time {
- color: darken($fg_color,30%);
- font-feature-settings: "tnum";
- @include fontsize($base_font_size - 2);
- font-weight: normal;
- }
}
/* World clocks */
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index e7d3c47b26..1fd6ccdbc2 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -351,6 +351,11 @@ class WeatherSection extends St.Button {
const [, tempValue] = fc.get_value_temp(GWeather.TemperatureUnit.DEFAULT);
const tempPrefix = tempValue >= 0 ? ' ' : '';
+ let time = new St.Label({
+ style_class: 'weather-forecast-time',
+ text: timeStr,
+ x_align: Clutter.ActorAlign.CENTER,
+ });
let icon = new St.Icon({
style_class: 'weather-forecast-icon',
icon_name: fc.get_symbolic_icon_name(),
@@ -362,18 +367,13 @@ class WeatherSection extends St.Button {
text: '%s%.0f°'.format(tempPrefix, tempValue),
x_align: Clutter.ActorAlign.CENTER,
});
- let time = new St.Label({
- style_class: 'weather-forecast-time',
- text: timeStr,
- 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);
+ layout.attach(time, col, 0, 1, 1);
+ layout.attach(icon, col, 1, 1, 1);
+ layout.attach(temp, col, 2, 1, 1);
col++;
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]