Bug 408055 - Plasma panel height is ignoring both "force font dpi" and "scale display" in system settings when resizing window in virtualbox with auto-resize guest display enabled
Summary: Plasma panel height is ignoring both "force font dpi" and "scale display" in ...
Status: RESOLVED DUPLICATE of bug 356446
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.15.90
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-29 08:13 UTC by Marian Klein
Modified: 2021-07-28 16:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Neon guest OS in virtual box maximized window panel height is good. (3.72 MB, image/png)
2019-05-29 17:31 UTC, Marian Klein
Details
Not maximized window panel goes too tiny by default. (3.22 MB, image/png)
2019-05-29 17:34 UTC, Marian Klein
Details
Non-maximized guest os virtualbox window, guest OS panel manually set taller for readability (3.18 MB, image/png)
2019-05-29 17:37 UTC, Marian Klein
Details
After some resizing of VirtualBox window with guest OS/neon, the guest OS panel reverts back to small height. (3.47 MB, image/png)
2019-05-29 17:40 UTC, Marian Klein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Klein 2019-05-29 08:13:25 UTC
SUMMARY

This is a re-reported the closed bug 408003 with changed title and with modified expectations/proposal.

Modern HiDpi laptops/tablets/convertibles need to set higher value in force fonts DPI in systems setting. The logic that calculates default panel height 
does not take system settings force font dpi" into account. 
Panel height can be set manually by user easily if user is not happy and fonts/icons are too small.
But when the screen resolution is constantly changing as is the face for users of virtualbox with "auto-resize guest display" feature then this is no longer an option.  Please review the logic for default/automatic panel height setting.

STEPS TO REPRODUCE
1. use HiDPI laptop with resolution at least 3200x1800. I use HP spectre x360 convertible with resolution 3840x2160. Set the highest resolution of the laptop.

2. Use virtualbox 6 and install neon-developer-20190514-0001.iso into it, update packages (as of 27may 2019)

3. In both the host and guest(neon) system set the highest resolution of the laptop  and set true/genuine dpi for that resolution in force font dpi setting.  You calculate true dpi by taking horizontal resolution of the screen and divide horizontal dimension of the screen in inches . In my case 3840 / 29.5cm = 3840/11.6 inch= 330dpi


OBSERVED RESULT
In the guest system neon the plasma panel height is too small and initially can be set manually to an acceptable height to make opened applications names 
 readable. When resizing the window in virtualbox with "auto-resize guest display" feature the panel height is not preserved "readable" height as set manually because the kde/plasma always resets panel height to a very small height as it was initially. Opened application titles are not readable with that height on hidpi laptops.

EXPECTED RESULT
There are alternatives:

a) introduce some new checkbox in system settings or plasma panel setting ,which when checked would not change display height in pixels regardless of changed resolution.(designed to work with fixed dpi situation such as guest os inside virtual box)

or

b)  logic for the default/automatic panel height respects at least one of "force font dpi" or/and "scale display" value in system setting 

c) Come up with something else to improve user experience regarding this issue when used as a guest OS inside any VM.



Interesting when virtualbox window is in maximized state the guest OS panel height (neon) is set correctly even with high "force font dpi" system settings.The problem is observed only in windowed mode (not maximised state) in virtual box. Even if the size of virtual box window in windowed mode is close to actual size of maximized window the height of panel is too small to be readable.

Note that menu/launcher/dashboard is not affected and fonts is always correct when resizing display. Just the panel at the bottom 

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.0
Kernel Version: 5.0.0-15-lowlatency
OS Type: 64-bit
Processor: 1 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 3.9 GiB of RAM
Comment 1 Marian Klein 2019-05-29 17:31:59 UTC
Created attachment 120374 [details]
Neon guest OS in virtual box maximized window panel height is good.

Neon guest OS in virtual box maximized window panel height looks good by default.
Comment 2 Marian Klein 2019-05-29 17:34:17 UTC
Created attachment 120375 [details]
Not maximized window panel goes too tiny by default.
Comment 3 Marian Klein 2019-05-29 17:37:53 UTC
Created attachment 120376 [details]
Non-maximized guest os virtualbox window, guest OS panel manually set taller for readability
Comment 4 Marian Klein 2019-05-29 17:40:54 UTC
Created attachment 120377 [details]
After some resizing of VirtualBox window with guest OS/neon, the guest OS panel reverts back to small height.
Comment 5 Marian Klein 2019-05-29 17:44:08 UTC
Note that maximized (first picture in attachment) and non-maximized (second picture) windows are very close in size. And yet panel height logic sets very different automated/default panel heights.
Comment 6 Marian Klein 2019-05-29 17:48:14 UTC
See bug 408055
Comment 7 Nate Graham 2019-05-29 18:19:12 UTC
Does this happen if you *don't* set the Force Fonts DPI to some high value?
Comment 8 Marian Klein 2019-05-29 18:59:12 UTC
My native screen dpi is 330 as I explained in the bug report, but I only try up to 92*3 dpi for symmetry with "scale display".

Originally I was setting  either  ("force font dpi=288" a and "scale display=1")
or (unchecked "force font dpi"  and "scale display=3") 

And yes the effect for non-maximized window was there in both cases and panel in maximized window and full screen looked correct/big enough.

After you prompted me I tried  
(unchecked "force font dpi" and "scale display") and panel in maximized window and
menu and desktop fonts look big with readable size. The effect with smaller panel in non-maximized window is still there too.
I am confused regarding font in menu and desktop, maybe guest OS gets correct DPI via VirtualBox from host OS without 
me messing with scale display and force font dpi. I don't remember how it was when I installed neon first. 
I noticed only sddm login screen had too tiny font (But this is another unrelated bug).c 
Probably I will try to install neon from scratch to notice initial state.
Comment 9 Marian Klein 2019-05-29 19:10:56 UTC
When "scale display=1" and "force font dpi" is unchecked
then Menu and desktop icons are of a good size ,but dolphin and fonts in menu on left size in system settings look too tiny. So I am confused now why neon does not treat kde fonts consistently.
"display scale=3" fixes the problem with fonts in dolphin and menu on left in system settings
Comment 10 Nate Graham 2020-12-17 19:42:01 UTC
Seems like this is another instance of Bug 356446.

*** This bug has been marked as a duplicate of bug 356446 ***
Comment 11 Nate Graham 2021-07-26 21:00:42 UTC
Un-duping since this should be possible to fix separately even if Bug 356446 is never fixed.
Comment 12 Nate Graham 2021-07-28 16:42:15 UTC
Upon further investigation and consultation with colleagues, ultimately the only way to cleanly fix this is indeed to use Qt scaling. Re-duping to Bug 356446.

*** This bug has been marked as a duplicate of bug 356446 ***