Bug 466098 - New Panel minimum thickness calculation only makes sense when the panel is floating
Summary: New Panel minimum thickness calculation only makes sense when the panel is fl...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.27.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 466672 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-19 18:09 UTC by earthquake125
Modified: 2023-03-25 13:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description earthquake125 2023-02-19 18:09:20 UTC
SUMMARY
Panels now cannot go below a certain minimum height. This minimum height is incorrect, and also seems to be based on Plasma theme. May be related to commit 1f9c06b9 . Issue is present with Breeze

STEPS TO REPRODUCE
1. Switch to a plasma style where this bug is present (I use Sweet, but I've confirmed that this also happens with a majority of styles)
2. Attempt to create/resize a panel to a size less than 32 (or some certain number, depending on theme it seems. seems to mostly be either 32 or 20).
3. Observe that Plasma doesn't allow this

OBSERVED RESULT
Size of panel is limited, to 32 in my case and cannot be smaller

EXPECTED RESULT
Set desired size (this was the result in previous plasma versions)

DEMONSTRATION:
https://youtu.be/hh56hJqhrZ4

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: archlinux rolling, KDE Plasma 5.27.0 
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 Nate Graham 2023-02-22 00:14:27 UTC
The global minimum is 20, which hasn't changed.

For 5.27, we also added code to prevent panel thicknesses that are thin enough that themes with large rounded corners would produce visual glitches. However evidently the code is a bit buggy. Are you using Wayland or X11, and are you using any screen scaling? I ask because on Wayland with 200% scale, the minimum thickness I see is exactly half the minimum thickness that other people are seeing, so I wonder if we're inappropriately scaling it or something.

If you're on X11, do you have the PLASMA_USE_QT_SCALING=1 environment variable set?
Comment 2 earthquake125 2023-02-22 04:34:59 UTC
(In reply to Nate Graham from comment #1)
> The global minimum is 20, which hasn't changed.
> 
> For 5.27, we also added code to prevent panel thicknesses that are thin
> enough that themes with large rounded corners would produce visual glitches.
> However evidently the code is a bit buggy. Are you using Wayland or X11, and
> are you using any screen scaling? I ask because on Wayland with 200% scale,
> the minimum thickness I see is exactly half the minimum thickness that other
> people are seeing, so I wonder if we're inappropriately scaling it or
> something.
> 
> If you're on X11, do you have the PLASMA_USE_QT_SCALING=1 environment
> variable set?

This is on X11. That environment variable is not set. Scaling is at normal 100% on my 2560x1440 display.
Comment 3 Nate Graham 2023-02-22 20:15:21 UTC
Can confirm with the Sweet theme. I see the issue now. 

The minimum panel thickness has gained a new condition: it's also twice the active plasma theme's corner radius. This is because when using a floating panel, any thinner and the panel would have visual glitches with such a large corner radius.

However, not everyone uses a floating panel. When using a maximized non-floating panel, the corner radius is irrelevant because your panel will have no corners. And even when using a non-maximized non-floating panel, the panel will only have top corners, so the minimum thickness only needs to be 1x the corner radius, not 2x.

We can refine the calculation to take those into account. But as a consequence, when you use a panel with a thickness that's greater than 20 but less than double the corner radius of your current plasma theme, if you switch that panel into floating mode, it will become thicker.

Our options are:
- Do the above ^^
- Remain with the status quo and accept the issue
- Revert the changes and accept that thin floating panels will look visually broken when using a Plasma theme with a large corner radius
Comment 4 Bug Janitor Service 2023-02-23 18:38:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1397
Comment 5 Nate Graham 2023-03-01 21:31:01 UTC
*** Bug 466672 has been marked as a duplicate of this bug. ***
Comment 6 Niccolò Venerandi 2023-03-25 09:50:43 UTC
Git commit 2960f6c54cdb529d20a5eec326bf6f70a8599fdb by Niccolò Venerandi, on behalf of Niccolo Venerandi.
Committed on 25/03/2023 at 09:50.
Pushed by niccolove into branch 'Plasma/5.27'.

Divide minimum panel size by two when not floating

M  +5    -2    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/commit/2960f6c54cdb529d20a5eec326bf6f70a8599fdb