lumina-desktop / lumina

Lumina Desktop Environment
http://lumina-desktop.org
BSD 3-Clause "New" or "Revised" License
532 stars 116 forks source link

Add animation as visual cue for dragging and dropping files #487

Open SawFishDaemon opened 7 years ago

SawFishDaemon commented 7 years ago

As of right now we have no visual cue that we are actually dragging and dropping a file. We drag and drop, and blindly trust that we did drag and drop that file.

I remember in Dolphin when you grabbed the file it showed a picture of the icon (name included) being dragged around; and that gave us a visual cue that we had actually grabbed the file and where dragging it around.

Even without the file name, would it be possible to have maybe like a hand squeezing a piece of paper or some sort of visual cue that lets us know that we have actually grabbed the file and are dragging it around?

q5sys commented 7 years ago

Thanks for the ticket. This is something we should be able to manage without too much difficulty, we just need to change the cursor using Qt::CursorShape. I might be mistaken, but I believe currently the specific type of action is not known by the file manager until after the click is released. If I'm correct in that we will need to change that in order for this to work properly.

http://doc.qt.io/qt-4.8/qt.html#CursorShape-enum

Mrt134 commented 7 years ago

Tacking on a related enhancement request: When dragging a file on top of a directory, that directory should be highlighted or have some visual cue that dropping the file places it into the directory.

beanpole135 commented 7 years ago

@q5sys : After playing around with it a bit, I think we are going to have to go the paintEvent() replacement routine as detailed in these examples:

https://stackoverflow.com/questions/37795528/why-do-i-not-see-the-drop-indicator-in-a-qtableview

https://stackoverflow.com/questions/44422703/qtreewidget-sub-classing-stop-drop-indicator-from-showing-given-unwanted-dropin (just reverse the logic here, we do want the drop indicator in our situation).