From b1f4ac10da91a081852a0435fa75bef1c12f491c Mon Sep 17 00:00:00 2001 From: Joonas Henriksson Date: Mon, 17 Aug 2020 17:15:25 +0300 Subject: [PATCH] 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 --- data/theme/gnome-shell-sass/widgets/_calendar.scss | 1 - js/ui/calendar.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data/theme/gnome-shell-sass/widgets/_calendar.scss b/data/theme/gnome-shell-sass/widgets/_calendar.scss index 4f567a82d..16391a14e 100644 --- a/data/theme/gnome-shell-sass/widgets/_calendar.scss +++ b/data/theme/gnome-shell-sass/widgets/_calendar.scss @@ -170,7 +170,6 @@ height: 1.8em; width: 2.3em; border-radius: 2px; - padding: 0.5em 0 0; margin: 6px; background-color: darken($bg_color, 2%); color: lighten($fg_color, 5%); diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 6a5f024f7..710efbac4 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -680,6 +680,7 @@ var Calendar = GObject.registerClass({ style_class: 'calendar-day-base calendar-week-number', can_focus: true }); let weekFormat = Shell.util_translate_time_string(N_("Week %V")); + label.clutter_text.y_align = Clutter.ActorAlign.CENTER; label.accessible_name = iter.toLocaleFormat(weekFormat); layout.attach(label, rtl ? 7 : 0, row, 1, 1); }