Bug 493371

Summary: Shortcut delegates cut off extremely long text
Product: [Applications] systemsettings Reporter: reports_go_brrr <goodaqua>
Component: kcm_keysAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: fanzhuyifan, kde, kde, nate
Priority: NOR    
Version: 6.1.5   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:
Attachments: Showcase

Description reports_go_brrr 2024-09-19 16:56:00 UTC
Created attachment 173889 [details]
Showcase

SUMMARY
Field with shortcuts for starting up file can't be shown if Settings window is shrinked.
Works under X11 and Wayland.

STEPS TO REPRODUCE
1. Go to Settings
2. Go to "Shortcuts"
3. Press "Add New" > "Command or Script"
4. Choose script which sits behind good amount of folders or has long filename
5. Add it

OBSERVED RESULT
Path to the screen is limited to window width.

EXPECTED RESULT
There is a thing that Dolphin strips such files paths from "/home/user/file.sh" to "/home/us....sh". I wish it will be there too.
Also, to show the full path - to left cursor upon that field to show it in popup. And if i'd like to copy, then by Context menu "Copy path".

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Kernel Version: 6.10.10-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Vanilla KDE Plasma, vanilla EndeavourOS.
Keys capturing in the video done by ShowMeTheKey.
© Art in the video by axo1otl - "Scarlet Tree"
Comment 1 Bug Janitor Service 2024-09-20 14:17:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2534
Comment 2 Nate Graham 2024-09-25 02:00:43 UTC
Git commit 82a61c39f0ecb0ea6882d81942d9bdfdecae14b7 by Nate Graham, on behalf of Akseli Lahtinen.
Committed on 25/09/2024 at 02:00.
Pushed by ngraham into branch 'master'.

kcms/keys: Wrap long shortcut names

If shortcut name is too long, it was not wrapped. Since we have
a lot of scrollable space, just wrap the text.
FIXED-IN: 6.2.0

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/82a61c39f0ecb0ea6882d81942d9bdfdecae14b7
Comment 3 Nate Graham 2024-09-25 02:02:17 UTC
Git commit 5c7ff0eb220bb6982a1a3911834dba321100043e by Nate Graham.
Committed on 25/09/2024 at 02:02.
Pushed by ngraham into branch 'Plasma/6.2'.

kcms/keys: Wrap long shortcut names

If shortcut name is too long, it was not wrapped. Since we have
a lot of scrollable space, just wrap the text.
FIXED-IN: 6.2.0


(cherry picked from commit 82a61c39f0ecb0ea6882d81942d9bdfdecae14b7)

3947a308 Wrap long shortcut names
2b0f5f5f Set maximum width to the displayLabel, remove fillWidth from keySequenceList
39c069c5 Ensure minimumWidth for displayLabel, set maximumWidth for keySequenceList

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

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

https://invent.kde.org/plasma/plasma-desktop/-/commit/5c7ff0eb220bb6982a1a3911834dba321100043e