Bug 507860 - Keyboard Shortcuts expand button is pushed to the right by very long text
Summary: Keyboard Shortcuts expand button is pushed to the right by very long text
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (other bugs)
Version First Reported In: 6.4.3
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-04 16:47 UTC by joshas
Modified: 2025-09-26 14:36 UTC (History)
5 users (show)

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


Attachments
Issue with offset expand arrow button (72.67 KB, image/png)
2025-08-04 16:47 UTC, joshas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joshas 2025-08-04 16:47:34 UTC
Created attachment 183785 [details]
Issue with offset expand arrow button

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY
Keyboard Shortcuts expand button (one with arrow icon) is pushed to the right by long text.

STEPS TO REPRODUCE
1. Open "System Settings"
2. Go to "Keyboard" and then to "Shortcuts"
3. Click on "Touchpad".

OBSERVED RESULT
On the line "Enable Touchpad" expand arrow will be pushed to the right and does not align with other arrows below.

EXPECTED RESULT
All expand arrows should be aligned exactly the same.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora Linux 42
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Same issue occurs in other sections of "Shortcuts" applet too.
Comment 1 Nate Graham 2025-09-24 19:09:19 UTC
Can reproduce on current git master, too.
Comment 2 Bug Janitor Service 2025-09-25 20:15:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/3212
Comment 3 Nate Graham 2025-09-26 14:36:23 UTC
Git commit d3e02bb1d979ace8e1c083b8ee591f74ce9417bc by Nate Graham.
Committed on 26/09/2025 at 14:15.
Pushed by ngraham into branch 'master'.

kcms/keys: position expand button correctly with elided shortcut text

When the shortcut text is long, the maximum length of its label is
capped so that it elides rather than pushing the button out of the
layout. But it was not accounting for the RowLayout's spacing, so the
button got pushed a little bit anyway.

Instead of this manual calculation, use the simpler horizontal stretch
factor feature.
FIXED-IN: 6.4.6

M  +2    -1    kcms/keys/ui/ShortcutActionDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/d3e02bb1d979ace8e1c083b8ee591f74ce9417bc