Skip to content

qml: fix annoying drag item position overriding

Fatih Uzunoğlu requested to merge fuzun/vlc:qml-fix-drag-override-pos into master
  • Currently, the way drag positioning works is that Qt adjusts the position when drag is active and then this position is overridden immediately by the mouse area. This is quite ugly workaround, and it has been annoying me for a long time let alone the issues it caused.
  • Proposal: set the drag item position before drag starts and let Qt make the drag item follow the cursor.

I'm not happy with qml: disable selective drop indicator visibility, as I believe it is a useful indication from the UI side. However, it seems it can not work reliable since selection is asynchronous. I believe there is the same problem with drag item itself, however I added indexes.length > 0 condition for its visibility so that even if selection is asynchronous, the only problem would be delayed visibility. One workaround for drop indicators might be checking if drop is acceptable on position change as opposed to onEntered, but I did not find this nice.

I proposed to make certain stuff regarding UI/backend integration synchronous, but I have not found enough supporters for making the change. I don't think Qt Quick is designed to handle everything asynchronously.

Edited by Fatih Uzunoğlu

Merge request reports