Bug 494887

Summary: Clipboard pop up window too tall, lacks border and first item obscured by buttons
Product: [Plasma] plasmashell Reporter: Luke Horwell <code>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: kde, nate
Priority: NOR    
Version First Reported In: 6.2.1   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Clipboard pop up in 6.1.5 vs 6.2.1
Border and resizing workaround using window rules

Description Luke Horwell 2024-10-16 20:37:15 UTC
SUMMARY

Since Plasma 6.2.0, it feels uncomfortable to use the clipboard pop up (Klipper) due to the large excessive height it takes when opened using a global shortcut (CTRL+V). This is more apparent when the cursor is near the bottom and there are only a few items.

It also lacks a border/shadow, so the background can clash with similar colours underneath - at least under a dark theme.

The first item is highlighted (as with previous versions), but now there are now 4 buttons obscuring the text.


STEPS TO REPRODUCE
1. Have multiple items copied to the clipboard.
2. Open a KWrite window near the bottom of the screen and open the clipboard pop up (CTRL+V) on a 1080p/2160p screen.


OBSERVED RESULT
The list is positioned much higher from where the cursor is due to the excessive height, taking up under half the screen in some cases. The lack of border/shadow on the pop up causes it to blend into the application toolbar. Items also had large padding which seems out of place for a contextual menu/pop up. The text for the first item was obscured by 4 buttons.


EXPECTED RESULT
The pop up fits the contents of the list; items didn't have too much padding and the pop up has a shadow/border to enforce it's floating above the window. The text for the first highlighted item isn't obscured by buttons.


SOFTWARE/OS VERSIONS
Arch Linux
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0


ADDITIONAL INFORMATION
The older context menu style was greatly preferred as it was simple, smaller and more productive. As a user, I used the pop up clipboard menu for switching between text, but not to switch images or manage the clipboard itself. More control was possible via the "Clipboard" applet when needed.

If the change intentional for 6.2.0, this bug could be a suggestion to consider a context menu when non-text selection is disabled, or if the focused input is a text box (which sounds impossible). Otherwise, I would be interested to patch it back locally, or perhaps there's an API to read Klipper so a custom script can handle the shortcut?
Comment 1 David Edmundson 2024-10-16 21:35:15 UTC
There was an intentional change. 

Note the dialog is resizable (meta right click) but not via normal controls. That's a valid bug to take on. It also needs a minimum size setting.
There is a shadow. It's the same as the plasma popup (which was the intention). 


>. Otherwise, I would be interested to patch it back locally,

Sure, see plasma-workspace/klipper . You can probably find the relevant commit and revert it. You're on your own with that.
Comment 2 Luke Horwell 2024-10-16 23:35:19 UTC
Created attachment 174921 [details]
Clipboard pop up in 6.1.5 vs 6.2.1

Attached is a screenshot comparison that didn't upload earlier for some reason. 

Thanks for the tips! Resizing with meta + right click helps a lot. I already patch some other KDE packages, so I may embark on my own on that.
Comment 3 Luke Horwell 2024-10-16 23:37:06 UTC
Created attachment 174922 [details]
Border and resizing workaround using window rules

As you've pointed out it's a dialog, this makes sense. The shadow is tiny, but this might be misexpectations since my Breeze Window Decoration setting is set to "Large" for shadows, although this is also the case for any plasma thing that pops up. (possible bug?)

It is possible to workaround by adding a window rule ("Clipboard Popup" title) with "No titlebar and frame" = "No", and then set a window-specific override in the window decorations to add a tiny border and hide the title bar.
Comment 4 Nate Graham 2024-12-12 19:28:40 UTC
So yeah, these were intentional changes.  There were code sharing reasons as well as UX reasons (same UX, better for multiline text and images) so I don't see us going back, sorry.

Not being resizable via the corners is a reasonable request, but can you open a new bug report requesting just that?
Comment 5 Luke Horwell 2024-12-12 21:46:04 UTC
No problem. In the end, I wrote my own "open at mouse cursor" replacement to complement Klipper:
https://github.com/lah7/clipqture