keepassxc
keepassxc copied to clipboard
When moving more than two entries it creates a huge rectangule and turn the target impossible to see
Overview
Whenever I try to move more than two entries the animation of moving the entries completely block the target group, forcing me to guess the directory position.
Steps to Reproduce
- Select two or more entries in your main window
- Try dragging them to a group
- The animation actualy draw the full rectangles completely hidding anything behind this rectangles.
Expected Behavior
The dragging animation should be transparent so you can see the target and, ideally, it should not move the whole entry field which results in a huge rectangule.
If you need example of proper implementation you could try selecting multiple files/folders in windows 10 or probably any operating system and you can understand the proper way to do it.
Actual Behavior
Draggin multiple entries result in a huge rectangule that blocks the view and turn dropping them in groups a guessing game or use a workaround that is dragging from the beggining of the entries field.
Context
KeePassXC - 2.6.4
Operating System: Windows Desktop Env: ... Windowing System: ...
Good point that is rather annoying.
Could this be a platform-dependent Qt problem? I can't reproduce it on Mac (the transparency works well). We can try to reduce the rectangle anyway
That might actually be the solution - enabling transparency while dragging. If Qt allows for such a thing in Windows, that is.
It's not clear how to get a widget handle for tye dragged object. That is currently all handled internally to the QTreeView. If you had a widget pointer you could set its transparency.
It's not clear how to get a widget handle for the dragged object. That is currently all handled internally to the QTreeView. If you had a widget pointer you could set its transparency.
This code seems to work, I'm not a c++ guy, would appreciate if someone looked at it https://forum.qt.io/topic/60422/hide-default-drag-rendering/7
Edit: Forgot to mention that I tested it locally (and also it shouldn't use copy action)
Interesting, will give it a try
The only way to actually fix this is to completely overwrite the QAbstractItemView::startDrag virtual function... Qt sucks
I was able to get this to work:
Still needs some love but I am thinking of going this direction.
I settled in on this: