calendar: Vertically center align week numbers
The labels were previously aligned by using top-padding, which was relative to font-size, and therefore didn't always align the text correctly when font scaling was enabled. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1415
This commit is contained in:
parent
2fc6384bca
commit
b1f4ac10da
@ -170,7 +170,6 @@
|
|||||||
height: 1.8em;
|
height: 1.8em;
|
||||||
width: 2.3em;
|
width: 2.3em;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
padding: 0.5em 0 0;
|
|
||||||
margin: 6px;
|
margin: 6px;
|
||||||
background-color: darken($bg_color, 2%);
|
background-color: darken($bg_color, 2%);
|
||||||
color: lighten($fg_color, 5%);
|
color: lighten($fg_color, 5%);
|
||||||
|
@ -680,6 +680,7 @@ var Calendar = GObject.registerClass({
|
|||||||
style_class: 'calendar-day-base calendar-week-number',
|
style_class: 'calendar-day-base calendar-week-number',
|
||||||
can_focus: true });
|
can_focus: true });
|
||||||
let weekFormat = Shell.util_translate_time_string(N_("Week %V"));
|
let weekFormat = Shell.util_translate_time_string(N_("Week %V"));
|
||||||
|
label.clutter_text.y_align = Clutter.ActorAlign.CENTER;
|
||||||
label.accessible_name = iter.toLocaleFormat(weekFormat);
|
label.accessible_name = iter.toLocaleFormat(weekFormat);
|
||||||
layout.attach(label, rtl ? 7 : 0, row, 1, 1);
|
layout.attach(label, rtl ? 7 : 0, row, 1, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user