Created attachment 174100 [details] Visual artifacts SUMMARY Since the GridUnit has been decoupled from the font size, using a large enough font (Noto Sans 13 in my case) leads to some visual artifacts: - the content of the color scheme preview tile extends beyond its boundaries - popup dialogs are not adjusted to the content and have scroll bars, even if they are not needed SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20240924 KDE Plasma Version: 6.1.5 KDE Frameworks Version: 6.6.0 Qt Version: 6.7.2 Graphics Platform: Wayland
Definitely fallout from the GridUnit change. 13px font is within the supported range, so we should fix this. Possible fixes include: 1. For each affected layout, base sizes on layouts' implicit widths and heights instead of using hardcoded GridUnit values. 2. Introduce a new global value like "Kirigami.Units.fontSizeMultiplier" that's a multiple of the default font size (which in your case would work out to be 1.3) and then multiply all hardcoded widths and lengths by that. 3. Revert the GridUnit change. --- #1 is the best approach, but the most work, and also wouldn't fully solve the problem because in some places, we do actually just want a hardcoded size. #2 is less work but still a lot, and would get us back to basically what we had before, just with a more intuitive API. #3 Is the easiest. To be honest, I'm leaning towards #3.
*** Bug 496857 has been marked as a duplicate of this bug. ***
what about adding an extra unit explicitly tied to fonts for where is really needed (calling it like em) and keeping gridunit as is now?
Yes please. I would be very very happy if we ended up with something like Kirigami.Units.fontSizeMultiplier that was a simple multiplier of the metrics of the current font relative to the default one.
All known occurrences of this issue (see the "See Also" field) are now fixed or have patches available to fix them; closing. Looks like the fallout was not as severe as I had feared, and we can fix individual cases of this as needed. Ultimately making assumptions about GridUnit was always a bad idea, and porting things to use actual metrics is the right approach. We'll do so as we find cases where this is needed