milkytracker / MilkyTracker

An FT2 compatible music tracker
http://milkytracker.github.io/
Other
1.7k stars 162 forks source link

Cocoa: Can't drag and drop files into Milkytracker #19

Closed Deltafire closed 9 years ago

dwhinham commented 9 years ago

You can if you're running my local version :) I'll have some commits for this ASAP.

dwhinham commented 9 years ago

Almost ready to commit a fix for this. :) Taken a bit longer because I wanted to implement the nice blue border effect that OSX does when you drag things over a drop target. Had to write some stuff to manually plot the pixels as well as save and restore what's under them. The result is quite nice and works well in the flesh:

screen shot 2015-07-16 at 23 10 34
Deltafire commented 9 years ago

My OSX doesn't have a blue border effect when drag & dropping :cry:

dwhinham commented 9 years ago

You don't find it everywhere, but it's found in a few places, like drag and drop onto Finder windows: drag_from_inactive_2x

It's a grey border if you switched to the grey colour theme in system preferences - my code uses a function to get the colour from the system. :)

Apple say:

Highlight the destination region as soon as the pointer enters it and stop highlighting when the pointer leaves the region. If there are multiple destination regions within a window, highlight one destination region at a time.

...so this is what I'm trying to achieve :smiley: