Summary: | Shorter titlebar (without smaller font) option needed: less padding | ||
---|---|---|---|
Product: | [Plasma] Oxygen | Reporter: | Duncan <1i5t5.duncan> |
Component: | win deco | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | REPORTED --- | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
oxygen titlebar negative vmargins demo hack-patch
testing only tiny titlebar button option patch |
Description
Duncan
2020-08-27 13:57:28 UTC
Does it help to reduce the button size? Forgot to mention, all my scaling is 1.0 (on X, obviously). I do /not/ have font-dpi forced but the xorg log says it's the standard 96x96. (Actual physical is dual 4k 75-inch TV-monitors, ~59 dpi according to the online calculator I just googled on ddg. Yes, I'm fighting for that titlebar height even with that sort of screen real estate to work with, as I typically have a video full-screen on one monitor and divide the other into a 2x2 window grid of 1730x1080 px windows with the remainder a gkrelm sysmon. RIP superkaramba. And 15 vs 30 px off the 1080 height of a single standard grid-window is still a big deal, even if that 1080 height is ~18 inches on-screen (with the 15 missing px being a measurable quarter inch!).) (In reply to Christoph Feck from comment #1) > Does it help to reduce the button size? I was using small size, the smallest possible choice, already. My first hack-patch added a tiny (*1.0) option, which did reduce size some, but not enough. So I attacked the padding, and after that I could actually set button size back to /normal/, actually /increasing/ it from small, without increasing the titlebar height. (I think it might have increased it 1 px for normal, but I was OK with that for the full-size button tradeoff, knowing I could always go back to small if I decided to. Once the padding was gone, tiny buttons aka *1.0 was /ridiculously/ tiny, /much/ tinier than either the font or the titlebar (the emblems inside were about the same size as the font was when I tried 4 pt font, unreadable), so it wasn't worth it. As I said, even normal was basically titlebar height, with the existing small below that, so tiny simply wasn't useful. But while I'm actually running normal button size ATM but with the tiny option still in the menu as I didn't actually move that patch out of my auto-patch dir, I'm still throwing in actually removing it from auto-patch as one of the pre-posting tests, just in case my tiny-button addition had some other effect and without it the small size is suddenly much bigger or something. Literally just moved it out for the test when I saw your reply popup in email, matter-of-fact. Created attachment 131226 [details]
oxygen titlebar negative vmargins demo hack-patch
Glad I took the time for a second look. A lot more made sense this time thru and I ended up dropping one patch entirely as unnecessary, and making another basically test-time only.
This is the main idea here.
At the given negative 2 TitleBar_TopMargin and -1 TitleBar_BottomMargin settings it squeezes things slightly on the Noto Sans Medium font, normally no exotic (aka mostly ASCII) characters common in my titlebar here. It's likely to be worse for Asian charactersets and the like, and as such it's likely to be the lower bound.
Zeroing out both values (along with TitleBar_OutlineMargin, already zeroed out here) would yield a somewhat less vertically squeezed titlebar that if I'm understanding the call to qt font-functions the metrics are based on correctly, should just fit maximum font ascenders and descenders even for non-western characters. Zeroed values resulted in a 16px high titlebar at 8pt font I was working with.
But the results for the negative values as posted are even better than I expected, a 10px high titlebar at the 8pt font size I was working with. That allowed me to increase the font to 10pt for 14px high. I'll have to play a bit more to see whether I prefer the extra 4px I get at 8pt font or the somewhat more comfortable to read 10pt. (9pt was the same 14px high titlebar as 10pt, while 11pt increase it to 17px. So 8pt and 10pt are the practical choices.)
Would be cool if I could do the option UI too but that's beyond me ATM. Assuming it's implemented, maybe I can learn from the commit adding it...
There's another minor testing-only patch coming too, adding a tiny button size, but it didn't reduce the titlebar size so I consider it only practical for testing.
Created attachment 131227 [details]
testing only tiny titlebar button option patch
While this patch didn't end up giving me a vertically shorter titlebar, but it's useful for testing, with the tiny titlebar button option it offers helping to ensure it's not the button size controlling the titlebar height, just the font size.
(Actually, being the first hack I tried it did give me a smaller than default titlebar, but not small enough. Clearly it was the font padding I had to attack. And after I did so I could actually choose the existing small or normal button sizes without increasing titlebar height, so this patch was no longer of much use except to ensure the buttons did not interfere with testing the padding patch.)
|