Skip to content

WIP: dateMenu: Make calendar scale with font size

Jānis Džeriņš requested to merge jdz/gnome-shell:issue-2331 into main

Use $base_icon_size as the base proportional unit since it is supposed to be 16px with default settings. This means 32px is twice this value, and is used as such for .pager-button.

The .calendar-day-base is more complicated because it reduces the font size for the element. The used factor values are not random:

  • Before the font size was decreased by 3. $base_font_size is 11, so adjusted font size 8 is 1.375 times smaller. So this factor is used to get back to the base font size.

  • 2px value used for margin and border-radius is one quarter of 8, so 0.25em value is used. Pretty sure this is grossly incorrect due to mixing of pixels, points and ems. But might just work by accident if the original assumption is a 96ppi display.

All in all I'm not very happy about this solution, but it solves the immediate problem of properly scaling the calendar with the system's font scaling factor.

Fixes #2331 (closed).

Edited by Florian Müllner

Merge request reports