Bug 438930 - Visual glitch in context menu when the shift modifier key is pressed
Summary: Visual glitch in context menu when the shift modifier key is pressed
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-19 22:15 UTC by Derek Christ
Modified: 2021-09-15 17:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments
Glitch (89.55 KB, image/png)
2021-06-19 22:15 UTC, Derek Christ
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Christ 2021-06-19 22:15:29 UTC
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.
Comment 1 Nate Graham 2021-07-28 20:19:07 UTC
Can reproduce. Feel free to submit a merge request to harmonize the implementations.
Comment 2 Bug Janitor Service 2021-08-28 18:59:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/552
Comment 3 Derek Christ 2021-09-09 21:00:34 UTC
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