Bug 516542 - PlasmaComponents3.Switch doesn't update switch size when theme is changed
Summary: PlasmaComponents3.Switch doesn't update switch size when theme is changed
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: components (other bugs)
Version First Reported In: 6.6.80
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-22 19:39 UTC by Filip Fila
Modified: 2026-03-04 19:34 UTC (History)
2 users (show)

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


Attachments
Test SVG to use for comparison with Breeze (29.48 KB, image/svg+xml)
2026-02-22 19:39 UTC, Filip Fila
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Fila 2026-02-22 19:39:39 UTC
Created attachment 189967 [details]
Test SVG to use for comparison with Breeze

SUMMARY
If we have themes that set different hints for the size of their switches, changing between the two will leave us stuck on the sizing of the first one. This can look bad. The workaround is to restart plasmashell, but the proper fix is that the switch component updates its sizing on theme change.

STEPS TO REPRODUCE
1. Compare two themes that set different hints for switch size (attaching a test svg to compare with Breeze)
2. Observe switch in the first theme and then change to the other theme
3. See that the switch is using the size of the previous theme

OBSERVED RESULT
Switch is using the sizing of the previous theme.

EXPECTED RESULT
Switch should update its sizing when the theme is changed.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.6.80
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.1

ADDITIONAL INFORMATION
I have a test fix I'm going to submit in a matter of minutes.
Comment 1 Bug Janitor Service 2026-02-22 19:49:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1445
Comment 2 Nate Graham 2026-03-04 19:29:00 UTC
Git commit dd3cf4c8776fb0f8a89840f538711f72361c046a by Nate Graham, on behalf of Filip Fila.
Committed on 04/03/2026 at 19:28.
Pushed by ngraham into branch 'master'.

plasmacomponents3/SwitchIndicator: update sizing on theme change

Currently the size of switches, as set by 'hint-bar-size', does not update
when a theme is changed. This commit fixes it by adding a repaint check.
FIXED-IN: 6.6.3

M  +10   -0    src/declarativeimports/plasmacomponents3/SwitchIndicator.qml

https://invent.kde.org/plasma/libplasma/-/commit/dd3cf4c8776fb0f8a89840f538711f72361c046a
Comment 3 Nate Graham 2026-03-04 19:34:26 UTC
Git commit d02f17add055140efd74c8600389a16731f60e49 by Nate Graham.
Committed on 04/03/2026 at 19:34.
Pushed by ngraham into branch 'Plasma/6.6'.

plasmacomponents3/SwitchIndicator: update sizing on theme change

Currently the size of switches, as set by 'hint-bar-size', does not update
when a theme is changed. This commit fixes it by adding a repaint check.
FIXED-IN: 6.6.3


(cherry picked from commit dd3cf4c8776fb0f8a89840f538711f72361c046a)

8ef49ea8 plasmacomponents3: Make switch sizing update on theme change

Co-authored-by: Filip Fila <filipfila.kde@gmail.com>

M  +10   -0    src/declarativeimports/plasmacomponents3/SwitchIndicator.qml

https://invent.kde.org/plasma/libplasma/-/commit/d02f17add055140efd74c8600389a16731f60e49