Bug 508954

Summary: Toggle switch doesn't scale properly with global fractional scale
Product: [Frameworks and Libraries] libplasma Reporter: tempqd <variable_valuables761>
Component: componentsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kde, nate, niccolo.venerandi, notmart
Priority: NOR    
Version First Reported In: 6.4.80   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Toggle switch at 100%, 150%, 200% global display scales

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.