[gnome-shell] calendar: Vertically center align week numbers
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] calendar: Vertically center align week numbers
- Date: Fri, 21 Aug 2020 18:45:06 +0000 (UTC)
commit b1f4ac10da91a081852a0435fa75bef1c12f491c
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 4f567a82dc..16391a14e9 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 6a5f024f71..710efbac45 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]