Bug 508954 - Toggle switch doesn't scale properly with global fractional scale
Summary: Toggle switch doesn't scale properly with global fractional scale
Status: CONFIRMED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: components (other bugs)
Version First Reported In: 6.4.80
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-31 04:11 UTC by tempqd
Modified: 2025-09-17 23:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Toggle switch at 100%, 150%, 200% global display scales (59.65 KB, image/png)
2025-08-31 04:11 UTC, tempqd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tempqd 2025-08-31 04:11:12 UTC
Created attachment 184593 [details]
Toggle switch at 100%, 150%, 200% global display scales

SUMMARY

For fractional global display scales, the toggle switch looks pixelated, unlike other components.

See attached image: 100% and 200% look great, but 150% looks like it might not take the device pixel ratio into account or something, it looks like the 100% but just bigger instead of scaled/snapped properly.

OS: openSUSE Krypton (Tumbleweed + git master KDE)
Comment 1 tempqd 2025-09-15 08:28:12 UTC
I looked into the svg itself (fractional values, viewbox, scale, etc like in https://invent.kde.org/plasma/libplasma/-/merge_requests/228) as well as rounding various values in the Switch qml files, and I couldn't seem to find any silver bullet.
Comment 2 Nate Graham 2025-09-17 15:44:10 UTC
Looks like an overlap mismatch that becomes more visually obvious at higher scale factors.

Are you using X11 or Wayland?
Comment 3 tempqd 2025-09-17 23:52:38 UTC
Yeah it looks like the (deliberately hardcoded) 1px offset lets some of the inactive background peek through next to the blue active part. And it also looks like the circular parts are more pixelated than I'd expect.

This is on Wayland, haven't tried X11.