Replies: 1 comment
-
What you're describing is the "complete drag and drop" which is OS level integration - that needs content negotiation and other features which make it more complex than dragging within the window or dropping a file in the window. I think this is captured in #142 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an app where the user can drop a file on a window for processing. Since 2.4 Fyne supports this with SetOnDropped(). It works well. But the (default) user experience is not clear. The only related event is the drop itself, so I can only show a confirmation after the act. I cannot find events related to a file drop being eminent?
I made a small video below that shows how a user generally expects this to work. Even this very github comment works exactly the same: as soon as the 'file dragging mouse' enters the drop area, that area immediately gives feedback to make it clear to the user that the file can be dropped, using color, border and/or text. Even the mouse cursor shows an additional green + icon for the same reason.
So to also give a little encouraging feedback I am trying to detect if a 'file dragging mouse' can be detected. I thought if I can track a moving mouse with the leftbutton pressed, then changes are high that a user is trying to drop a file. So if I can detect this I can reward and confirm the potential drop by changing the window color or show a nice text.
I found fyne-x code which (almost) does exactly what I need: https://github.com/fyne-io/fyne-x/blob/master/cmd/wrapper/main.go
But unfortunately this only works if the user moves the cursor inside the app itself. It does not work in the case a user starts by draging a file from the OS into the fyne.Window. Unfortunately.
Anybody else had this question and know possible solutions?
Untitled.mov
Beta Was this translation helpful? Give feedback.
All reactions