[gnome-shell/gnome-3-36] calendar: Vertically center align week numbers



commit 44af8502eb7becbf94b3f2d829d37ceeaf67a5a3
Author: Joonas Henriksson <joonas henriksson gmail com>
Date:   Mon Aug 17 17:15:25 2020 +0300

    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 a4f5b2d0a6..9207d5334e 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 8a8c01328d..25ac7ef0f5 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -684,6 +684,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);
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]