Bug 505175 - Setting the window title font too small results in an absurd titlebar size
Summary: Setting the window title font too small results in an absurd titlebar size
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_fonts (other bugs)
Version First Reported In: 6.3.5
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2025-06-03 17:20 UTC by Tech-Tac
Modified: 2025-06-08 14:08 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.5.0
Sentry Crash Report:


Attachments
Teeny tiny little window title (60.15 KB, image/png)
2025-06-03 17:20 UTC, Tech-Tac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tech-Tac 2025-06-03 17:20:28 UTC
Created attachment 182003 [details]
Teeny tiny little window title

SUMMARY
Setting the Window title font size in font settings too small, can result in a very thin, almost non-existent window titlebars, regardless of chosen button size in decoration config because it seems to also scale relative to the title font size.

STEPS TO REPRODUCE
1. Go to System Settings > Text & Fonts > Fonts
2. Set "Window title" font to any font with manually set to eg. 0.01
3. Press OK then Apply and observe how thin the titlebars become

OBSERVED RESULT
Window titlebars shrink down to approximately 8 pixels

EXPECTED RESULT
Titlebars stay the same size while only the text becomes tiny, if so the user desires, so that buttons are still clickable.

SOFTWARE/OS VERSIONS
Arch Linux
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
Wayland
Comment 1 Nate Graham 2025-06-03 23:27:28 UTC
Well then don't do that, silly! :D With great power comes great responsibility. Setting *any* font size to something like 0.01 is clearly going to break the system.

Ultimately we give people knobs to customize the system so they can improve its ergonomics for themselves according to their own needs and preferences; when people use it to actively destroy the system's ergonomics, we're going to have to start looking at the customization opportunities more dimly.

We could perhaps show a message if you set the font size to something absurdly small, the same way we do for something absurdly large. Or we could set a lower bound on the font size that you can't go below.
Comment 2 Tech-Tac 2025-06-04 04:30:20 UTC
I only really expected only the title text to get smaller, not the entire titlebar because there are still buttons that can get really hard to click if not straight up impossible with such small font sizes, also window buttons have their own size options in the Breeze decorations config, why is it still affected by title font size?
Comment 3 David Edmundson 2025-06-04 06:28:02 UTC
>why is it still affected by title font size?

Because otherwise a large font wouldn't fit. The  title bar changing is correct.

We can try to add a lower bound on the fonts.
Comment 4 Tech-Tac 2025-06-04 10:44:19 UTC
`titlebarHeight = max(fontHeight, buttonSize)`?
Comment 5 Felix Ernst 2025-06-04 14:26:46 UTC
I actively set my "Window title" font very small because I like having a small title bar. I don't think disallowing users to change the height of the title bar is an improvement. Quite the opposite really. But I agree that being able to make it so small that the minimise and close buttons are non-existent is a bug.
Comment 6 Tech-Tac 2025-06-04 17:00:20 UTC
Can we perhaps have another explicit titlebar height option? Because the current way to achieve it is rather hacky and indirect
Comment 7 Bug Janitor Service 2025-06-05 21:01:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5573
Comment 8 Nate Graham 2025-06-06 13:26:30 UTC
Git commit da990dc62f8a860e6512a82d5fca59602ee8ad96 by Nate Graham.
Committed on 06/06/2025 at 12:55.
Pushed by ngraham into branch 'master'.

kcms/fonts: save people from excessively small font sizes

The Qt font dialog lets you set the font to be absurdly small, down to
0.01pt.

Sizes this small don't make sense; let's set a lower bound of 4pt with
an appropriate warning message about that.

Let's also warn people if they try to set a size below 7pt, which is
not in the realm of "unusable" but rather "non-text UI elements may
all look too large". Instead, steer people towards the KScreen KCM, the
way we do if they try to use huge fonts.
FIXED-IN: 6.5.0

M  +5    -0    kcms/fonts/fonts.cpp
M  +1    -0    kcms/fonts/fonts.h
M  +40   -0    kcms/fonts/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/da990dc62f8a860e6512a82d5fca59602ee8ad96
Comment 9 Tech-Tac 2025-06-07 13:24:36 UTC
Nice change, but it is not how I wanted this to be solved, I set the original bug product to Breeze for a reason, even if the user sets the title font size to 4, the buttons and window icon are going to get smaller too, which I think is a bad side effect regardless if it is intentional or not. The Breeze window decoration config already has options to change button size.
Comment 10 Nate Graham 2025-06-08 13:04:23 UTC
That may also make sense, but let's get a new bug report for it since it's a separate change.
Comment 11 Tech-Tac 2025-06-08 14:08:30 UTC
(In reply to Nate Graham from comment #10)
> That may also make sense, but let's get a new bug report for it since it's a
> separate change.

https://bugs.kde.org/show_bug.cgi?id=505347