Bug 263562 - Initial panel thickness does not scale with systemwide scale factor on X11 with Plasma scaling
Summary: Initial panel thickness does not scale with systemwide scale factor on X11 wi...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 17:24 UTC by Felix Miata
Modified: 2023-09-18 20:34 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Miata 2011-01-18 17:24:33 UTC
/usr/share/kde4/apps/plasma/layout-templates/org.kde.plasma-
desktop.defaultPanel/contents/layout.js and /usr/share/kde4/apps/plasma/layout-templates/org.kde.plasma-
netbook.defaultPanel/contents/layout.js set fixed initial panel heights (in 4.5.95 on openSUSE at least)  27 & 28 respectively. These heights cause usability to suffer considerably as resolution is increased. Instead, initial values should be set based upon querying the desktop DPI. e.g., a 166 DPI desktop would get a height of around 47, and a 120 DPI desktop would get a height of around 34. If implemented, there wouldn't need to be a separate configuration branch according to whether desktop or netbook.

A more sophisticated approach might be to use pt (e.g. 20 or 21) instead of px (e.g. 27 or 28) values, since pt already take into account DPI.
Comment 1 Aaron J. Seigo 2011-01-18 19:49:40 UTC
pt can be used for calculation, but in the end all values must end up as pixels as that's what is used for geometries on-screen. which means there's very little benefit to using pt as it needs to be later translated to pixels anyways.

that said ... i'd be very happy to either accept a patch, or add it myself to the relevant scripts, which implements a variable default panel height based on screen resolution and DPI (it needs to be both, imho, since a high DPI but low resolution probably shouldn't trigger a massive panel).

if you would be interested in doing the "fiddle work" of determining which panel sizes work "better" on different resolutions, we could go from there.

"there wouldn't need to be a separate configuration branch according to whether desktop or netbook."

the difference between these scripts is far more than just how big the panel is. the contents as well as the panel containment plugins used are completely different.
Comment 2 Felix Miata 2011-01-18 20:22:39 UTC
(In reply to comment #1)
> a high DPI but low resolution probably shouldn't trigger a massive panel
 
Having just overhauled http://fm.no-ip.com/PC/displays.html less than 24 hours ago, I'm having a hard time contemplating any conditions that would cause such a result. Low resolution does not go hand-in-hand with high DPI; it's generally quite the opposite. DPI is a density measure. Resolution is an absolute with limited meaning absent knowing the space in which it fits.

Originally I was going to use "initial height should be based upon DPI" as summary, and this highlights why it might have been better. By "total screen height" I mean physically, not measured in pixels, which vary in density according to hardware. Choosing based upon DPI, this request, is about having a nice initial size _regardless_ of hardware configuration.

> ...fiddle work...

Knowing what I know about fonts, I have to think 28/27 currently specified infers a 23px or 24px icon plus 2px padding each top & bottom for 96 DPI.  I would expect satisfactory breaks at 25% increments, or 30+4 covering a 120 DPI range (108-131), 36+4 covering a 144 DPI range (132-153), 42+4 or 42+6 covering a 168 DPI range (154-179), 48+6 or 48+8 covering a 192 DPI range (180-203), etc.

> the difference between these scripts is far more than just how big the panel
> is. the contents as well as the panel containment plugins used are completely
> different.

I still think the overall width between desktop and netbook need differ none if this is implemented.
Comment 3 Felix Miata 2015-04-23 08:15:43 UTC
Still desirable for v5.
Comment 4 Nate Graham 2022-06-25 17:00:23 UTC
The initial thickness is a fixed height for design reasons, but that initial thickness size does scale with the screen scale on Wayland. The fact that it doesn't on X11 with Plasma scaling is a bug.
Comment 5 Zk Wang 2023-02-22 01:05:05 UTC
(In reply to Nate Graham from comment #4)
> The initial thickness is a fixed height for design reasons, but that initial
> thickness size does scale with the screen scale on Wayland. The fact that it
> doesn't on X11 with Plasma scaling is a bug.

This problem also exists for existing panels when we change the scaling factor of the screen in X11. The height of the existing panel is measured by raw pixels regardless of the scaling factors, resulting in very small panels on the high resolution screen.
Comment 6 Nate Graham 2023-02-22 19:58:20 UTC
Yes, that's the bug I mentioned.
Comment 7 Nate Graham 2023-09-18 20:34:19 UTC
Plasma scaling is no longer supported in Plasma 6, and this is fixed with Qt scaling, so marking as fixed in Plasma 6.