ubuntu / yaru

All Ubuntu Yaru GNOME themes

Home Page:https://community.ubuntu.com/c/desktop/theme-refresh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

With font scaling, text in the GNOME Shell search box is cut off

elcste opened this issue · comments

If you increase font scaling – either with Gnome Tweaks > Fonts > Scaling Factor or gsettings org.gnome.desktop.interface text-scaling-factor – text in the GNOME Shell search box is cut off.

Text scaling can help with hidpi screens and is an accessibility feature.

I noticed this a while ago but I finally got around to testing it systematically with today's noble daily build. The issue does not occur with the default GNOME/Adwaita Shell theme installed with gnome-session or other OSes like OpenSUSE Tumbleweed so it seems like a Yaru theme issue.

System information

Shell version 45.2
OS version Ubuntu 24.04, noble daily 2023-12-14
Yaru version 23.10.0-0ubuntu2

Screenshots

First, here is with scale of 1 (default/no scaling) and Ubuntu font, so no issue:

1-y-u

Here's with 1.375 scale factor (which I like on my 1080p/13.3-in laptop screen). Notice the botton of the g is cut off:

1375-y-u

It gets worse with a higher scale such as 1.5:

15-y-u

It does not depend on the font, although the Ubuntu font has short descenders so it is often worse with other fonts. Here's scale 1.375 with the GNOME-default Cantarell font:

1375-y-c

But no scale and Cantarell has no issue:

1-y-c

Upstream check

With the default GNOME/Adwaita Shell theme the issue does not occur with either font, Cantarell:

1375-a-c

Or Ubuntu:

1375-a-u

Thanks for the bug report. This looks like it should be reported to gnome-shell instead because it should know the texture it's rendering is being cut off: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues

Even though it only seems to occur with the Yaru theme? But you know a lot better than me! (Not trying to sound snarky, I respect your experience :-)

I suppose it is theoretically possible to be a Yaru bug. Depends if Yaru has a fixed size hard coded.

I am guessing this is the code based on the name:

https://github.com/ubuntu/yaru/blob/c19b3c323a3d986b69e14aeb3698ab9037f9ae57/gnome-shell/src/gnome-shell-sass/widgets/_search-entry.scss

I know CSS but have never looked at SCSS but can guess. Could those margin changes do it by "squeezing" the contents?

I admit I don't have a dev setup for this or know how to easily make a simple change to test it.

@elcste the margin only affects the placement of the search entry. A padding would affect the content inside.

Maybe this problem comes from a max-heigth inherited.