dateMenu: Tweak temperature labels
Together with the forecast icon, the temperature label is the most important information in the weather section. To emphasize it more, reduce its space requirement by removing the temperature unit, then make the text bold. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1143
This commit is contained in:
parent
f93e4d7424
commit
57751a2bef
@ -222,6 +222,10 @@
|
|||||||
icon-size: $base_icon_size * 2;
|
icon-size: $base_icon_size * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.weather-forecast-temp {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.weather-forecast-time {
|
.weather-forecast-time {
|
||||||
color: darken($fg_color,30%);
|
color: darken($fg_color,30%);
|
||||||
font-feature-settings: "tnum";
|
font-feature-settings: "tnum";
|
||||||
|
@ -348,6 +348,8 @@ class WeatherSection extends St.Button {
|
|||||||
timeOnly: true,
|
timeOnly: true,
|
||||||
ampm: false,
|
ampm: false,
|
||||||
});
|
});
|
||||||
|
const [, tempValue] = fc.get_value_temp(GWeather.TemperatureUnit.DEFAULT);
|
||||||
|
const tempPrefix = tempValue >= 0 ? ' ' : '';
|
||||||
|
|
||||||
let icon = new St.Icon({
|
let icon = new St.Icon({
|
||||||
style_class: 'weather-forecast-icon',
|
style_class: 'weather-forecast-icon',
|
||||||
@ -357,7 +359,7 @@ class WeatherSection extends St.Button {
|
|||||||
});
|
});
|
||||||
let temp = new St.Label({
|
let temp = new St.Label({
|
||||||
style_class: 'weather-forecast-temp',
|
style_class: 'weather-forecast-temp',
|
||||||
text: fc.get_temp_summary(),
|
text: '%s%.0f°'.format(tempPrefix, tempValue),
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
});
|
});
|
||||||
let time = new St.Label({
|
let time = new St.Label({
|
||||||
|
Loading…
Reference in New Issue
Block a user