Created attachment 139527 [details] Glitch SUMMARY When the shift modifier key is pressed while a context menu of a file or folder is open, a visual glitch appears at the bottom of the context menu. Please see my picture. STEPS TO REPRODUCE 1. Go to desktop 2. Right click on a file 3. Press and release shift OBSERVED RESULT Visual glitch EXPECTED RESULT No glitch SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20210616 KDE Plasma Version: 5.22.80 KDE Frameworks Version: 5.84.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION I have found this bug while working on Bug 425997. I will probably fix this bug myself soon. I think the glitch appears because the eventfilter of the context menu swaps the "move to trash" action with the delete action instead of changing it in place. I think doing it like Dolphin and switching the action in place will resolve this issue.
Can reproduce. Feel free to submit a merge request to harmonize the implementations.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/552
Git commit f830ceeaf012a9f87b7c0b2b2bb9b095de107da4 by Derek Christ. Committed on 09/09/2021 at 19:01. Pushed by davidedmundson into branch 'master'. Introduce RemoveAction for context menu The RemoveAction can either represent the delete action or the move to trash action, depending on the shift modifier state. This inplace swapping instead of adding and removing both actions fixes a visual glitch that could be noticed by pressing and releasing the shift key multiple times. FIXED-IN: 5.22 M +1 -0 containments/desktop/plugins/folder/CMakeLists.txt M +28 -46 containments/desktop/plugins/folder/foldermodel.cpp M +0 -2 containments/desktop/plugins/folder/foldermodel.h A +99 -0 containments/desktop/plugins/folder/removeaction.cpp [License: GPL(v2.0+)] A +49 -0 containments/desktop/plugins/folder/removeaction.h [License: GPL(v2.0+)] https://invent.kde.org/plasma/plasma-desktop/commit/f830ceeaf012a9f87b7c0b2b2bb9b095de107da4