Introduce custom status item view on OS X.#2232
Conversation
Reimplement tray functions on OS X by using custom statusItem view.
atom/browser/ui/tray_icon_cocoa.mm
Outdated
There was a problem hiding this comment.
Static variables should be put int anonymous namespace.
|
I haven't tested but I think we should redraw the status item after the |
|
And does the status item show correctly with dark menu bar? |
Oops. I have missed them. Done now.
Haven't test it yet due to my OS X version is 10.9. |
atom/browser/api/atom_api_tray.cc
Outdated
There was a problem hiding this comment.
drop-files might be a better name to match DOM's drop event.
There was a problem hiding this comment.
Done. Also having test in dark menu bar, the status item shows correctly.
atom/browser/api/atom_api_tray.cc
Outdated
There was a problem hiding this comment.
As stated by DOM's docs:
The drag event is fired when an element or text selection is being dragged (every few hundred milliseconds)
The drop event is fired when an element or text selection is dropped on a valid drop target.
drop should be better than drag in this case?
|
👍 |
Introduce custom status item view on OS X.
|
Thanks |
|
Hey guys, |
|
Is it possible to drag&drop (URL) for example? As far as I see, right now only files are allowed :( |
|
Seems like it's not optional to pass a Menu to |
This PR introduces a custom status item view in NSStatusItem, so that we can easily implement some features in tray:
right-clickedevent on OS X and Windows. As a side effect, the 'clicked' event will also be emitted even the tray has context menu.popContextMenuAPI on OS X and Windows.dragged-filesevent to support drag-and-drop feature on OS X.Fixes #1499, #1393, #1975, #1549.