Bug 461682 - Some plasma elements are drawn way too big after upgrade to Frameworks 5.100
Summary: Some plasma elements are drawn way too big after upgrade to Frameworks 5.100
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: 5.100.0
Platform: Fedora RPMs Linux
: VHI major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 461831 461851 461878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-10 23:45 UTC by Alessandro Astone
Modified: 2022-11-29 22:38 UTC (History)
12 users (show)

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


Attachments
Plasma PulseAudio Applet (196.26 KB, image/png)
2022-11-10 23:45 UTC, Alessandro Astone
Details
Icon-only Task Manager applet (2.01 KB, image/png)
2022-11-10 23:45 UTC, Alessandro Astone
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Astone 2022-11-10 23:45:03 UTC
Created attachment 153656 [details]
Plasma PulseAudio Applet

SUMMARY
After updating to Plasma 5.26.3 and/or Frameworks 5.100.0 the Plasma PulseAudio applet has oversized slider knobs and radio buttons (see attachment), and the Icons-only Task Manager applet has oversized "multiple instances open" icon (see attachment). There might be more instances where this happens, these are the ones i spotted.
Only happens in the X11 session

STEPS TO REPRODUCE
1. Log into a Plasma X11 session
2. Open the volume applet, or open multiple windows of the same program

OBSERVED RESULT
Huge icons!

EXPECTED RESULT
Normal sized icons!

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 36 KDE
(available in About System)
KDE Plasma Version: Plasma 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Comment 1 Alessandro Astone 2022-11-10 23:45:32 UTC
Created attachment 153657 [details]
Icon-only Task Manager applet
Comment 2 Nate Graham 2022-11-14 20:31:18 UTC
Cache invalidation bug; size metrics changed with some commit in plasma-framework and the SVG cache didn't get invalidated like it should have been. There's supposed to be logic to invalidate the cache on every frameworks version bump, but evidently it's not working.

You can fix this yourself by clearing the cache manually and restarting plasmashell:

rm ~/.cache/*plasma* ;; plasmashell --replace
Comment 3 Alessandro Astone 2022-11-14 20:35:01 UTC
`rm ~/.cache/*plasma* ;; plasmashell --replace` doesn't help.
Not even `rm -rf` to include directories or reboot.

If I log into the Wayland session though, that one looks normal. Of course when I log back into the X11 session it's still broken.
Comment 4 Nate Graham 2022-11-14 20:38:13 UTC
Oh, that makes this a different bug from what I thought. How exciting!

What global scale factor are you using, and do you have the PLASMA_USE_QT_SCALE=1 environment variable set anywhere? `echo $PLASMA_USE_QT_SCALING` will tell you.
Comment 5 Alessandro Astone 2022-11-14 20:44:03 UTC
PLASMA_USE_QT_SCALE is unset.
Quickly tried setting it, saw no changes
Comment 6 Alessandro Astone 2022-11-14 20:45:13 UTC
Missed one part of the question:
My global scale is 100%
Comment 7 soee 2022-11-14 21:03:12 UTC
I have the same issue with Frameworks 100 on Neon 22.04 and Plasma 5.26.
In my case it is also the audio applet as shown on the first attatchment.
Comment 8 soee 2022-11-14 21:04:08 UTC
(In reply to soee from comment #7)
> I have the same issue with Frameworks 100 on Neon 22.04 and Plasma 5.26.
> In my case it is also the audio applet as shown on the first attatchment.

100% Global Scale, not set $PLASMA_USE_QT_SCALING.
Comment 9 Patrick Silva 2022-11-14 21:11:40 UTC
*** Bug 461831 has been marked as a duplicate of this bug. ***
Comment 10 Christian (Fuchs) 2022-11-14 22:00:28 UTC
Also affected, other things I noticed: 

- scrollbars are affected
- icons in icon only task manager became slightly smaller, while third party systray icons (e.g. discord or mumble) became slightly bigger (compared via old screenshots)

also on X11, also fedora, also since the frameworks 100 update, so most likely unrelated to plasma updates as I didn't have any, scaling set via systemsettings -> monitor -> global scaling 125%, environment variables related to scaling are: 

QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS=HDMI-0=1.25;DP-0=1.25;DP-1=1.25;DP-2=1.25;DP-3=1.25;DP-4=1.25;DP-5=1.25;
Comment 11 Nate Graham 2022-11-14 22:37:46 UTC
So we have a regression on X11 when NOT using Qt scaling. Which is the common case. :/ Sigh.
Comment 12 Fushan Wen 2022-11-15 04:48:19 UTC
*** Bug 461851 has been marked as a duplicate of this bug. ***
Comment 13 Nicolas Fella 2022-11-15 17:47:44 UTC
*** Bug 461878 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2022-11-16 14:31:10 UTC
Git commit 159f9dbd6f9378c9d1943f83f13fce7c47e3d8b2 by Nate Graham, on behalf of Fushan Wen.
Committed on 16/11/2022 at 14:17.
Pushed by ngraham into branch 'master'.

svgitem: do not upscale svg when using fractional scaling
FIXED-IN: 5.101

M  +1    -1    src/declarativeimports/core/svgitem.cpp

https://invent.kde.org/frameworks/plasma-framework/commit/159f9dbd6f9378c9d1943f83f13fce7c47e3d8b2
Comment 15 Alessandro Astone 2022-11-29 22:38:29 UTC
So, I just realized I don't see the issue anymore and i'm still on Frameworks 5.100.0 (no backports either)
Mmh...?

I'm now on Fedora 37 but I'm not sure if it was fixed in the 36->37 upgrade or when.

Also, the supposedly fixing commit mentions fractional scaling but none of the reporters here were using any scaling?