Sebastien Bramille
d722d20974
Use NSString+ANSI on the Menu title
2017-11-28 15:34:13 +09:00
Cheng Zhao
4342480473
Fix cpplint warnings
2017-10-05 11:49:26 +09:00
Sean Bannigan
0b205019b6
add mouse-move event and click event position for tray
2017-10-05 11:41:08 +09:00
Kevin Sawicki
06a550b412
Autorelease tracking area
2017-06-28 12:37:31 -07:00
Kevin Sawicki
d53f07cc20
🎨
2017-06-28 12:13:12 -07:00
Kevin Sawicki
70544440f9
Add location and keyboard modifiers to tray mouse events
2017-06-28 12:10:24 -07:00
Shubham
8dbb8ccbab
add mouse-enter and mouse-exit events for tray
2017-06-14 18:00:29 -04:00
Cheng Zhao
7a7b72ce04
SimpleMenuModel::MenuClosed renamed to MenuWillClose
2017-02-06 10:34:28 -08:00
Pedro Belo
89e8ad4947
Fix support for dragging urls in Mac
2016-11-19 21:18:24 -08:00
Kevin Sawicki
b2f9cce297
Add option to always highlight the tray icon
2016-07-26 13:51:43 -07:00
Cheng Zhao
b57665330c
Merge branch 'master' into chrome52
2016-07-21 05:34:36 -06:00
Cheng Zhao
16e43a7f15
Merge pull request #6490 from wilsonpage/add-drop-text-support
...
Add support for dropped text in osx
2016-07-15 09:12:35 +09:00
Wilson Page
90f8a7e828
Add support for dropped text in osx
2016-07-14 18:25:58 +01:00
Cheng Zhao
6381f44f26
mac: Pass useDefaultAccelerator to getAcceleratorForCommandId
2016-07-07 11:50:19 -07:00
Cheng Zhao
1ba3907038
Update to API changes of Chrome 52
2016-07-04 15:32:43 +09:00
Kevin Sawicki
e797eb5ca3
Use set context menu when param is not specified
2016-06-29 11:52:58 -07:00
Cheng Zhao
db98e256f2
mac: Add tray.getBounds() API
2016-06-21 15:40:30 +09:00
Leonard Lamprecht
67dd19ed0f
Replace OS X and Mac OS with macOS
2016-06-18 15:26:26 +02:00
Cheng Zhao
548febfa4c
Fix style issues
2016-04-07 15:23:16 +09:00
Ben Gotow
e0ee60f290
Fix memory leak
2016-04-07 15:21:07 +09:00
Ben Gotow
91457fe739
Support images larger than self.bounds
2016-04-07 15:21:07 +09:00
Ben Gotow
f9644463a9
Fix broken template image support in Tray icon
...
Between Electron `0.30.x` and `0.37.x`, the tray icon stopped automatically inverting template images when highlighted. NSImageView normally uses the correct color for template images magicaly, but I think the addition of event handlers in the container view prevents the image view from determining highlight state.
This PR switches to drawing the image manually. The `drawRect` function decides whether to use `image` or `alternateImage`(pressed image) and then if that image is marked as a template, it fills it with the same color used for the text before drawing it.
2016-04-07 15:21:07 +09:00
leethomas
59eda67ba4
🍎 🐛 make displaying alternate tray image depend on mouse down event instead of highlight state
2016-01-05 09:49:27 -08:00
Nishanth Shanmugham
2bbf86c524
tray: Support file-drop from OS X Dock
...
A long-standing Apple bug does not call `prepareForDragOperation:sender`
for file drag-and-drop operations from the Dock. So we manually
call our custom `handleDrop:sender` for all drag-and-drop cases (that
is, from the Dock and from Finder).
References to the bug in question:
- http://stackoverflow.com/q/9534543/3309046
- http://openradar.appspot.com/radar?id=1745403
However, we still need to return YES from `prepareForDragOperation:sender`,
otherwise the "drag failed" animation occurs. For the same reason, we also
return YES from `performDragOperation:sender`.
2015-12-29 03:27:59 -06:00
Cheng Zhao
3cdd0f35c7
mac: Implement menu parameter
2015-12-02 19:05:22 +08:00
Cheng Zhao
2fba05b5e7
Add menu
parameter for Tray.popUpContextMenu
2015-12-02 18:43:11 +08:00
Cheng Zhao
87546bd4f8
Merge pull request #3479 from bengotow/tray-resizing
...
Fix sizing of Mac OS X tray icon after image change
2015-11-18 18:49:15 +08:00
Ben Gotow
9c69416e32
Fix sizing of Mac OS X tray icon after image change
...
- Consolidate logic that applies view dimensions into a function
- Use `NSVariableStatusItemLength` instead of trying to sync status item width
- Use modern Obj-C syntax `@[], @{}` in a few places
- Recompute view bounds after updating image in `setImage:`
2015-11-17 13:43:55 -08:00
Nishanth Shanmugham
d1e8e71e3f
Tray: Add drag-end and drop events
2015-11-10 10:02:50 -06:00
Nishanth Shanmugham
818892d474
Tray: Add drag-entered and drag-exited events
2015-11-05 18:46:49 -06:00
Brandon Cash
60b14d03e9
Fix: tray NotfiyDropFiles typo
2015-10-18 00:32:13 -05:00
Haojian Wu
2b051e3884
mac: make tray's behavior more official when getting clicked quickly
...
multiple times.
2015-08-26 16:28:22 +08:00
Cheng Zhao
33eadad139
popContextMenu => popUpContextMenu
2015-08-10 13:00:15 +08:00
Cheng Zhao
58dee04d5c
mac: Redraw icon when menu is closed
2015-08-10 12:52:35 +08:00
Cheng Zhao
a3f3a35fd1
mac: Don't emit "clicked" event if there is menu attached
2015-08-10 12:18:00 +08:00
Cheng Zhao
be24d3e78c
mac: Make the tray icon behave more like the official one
2015-07-30 13:58:53 +08:00
Haojian Wu
45f5a10d5d
Use NSImageView to draw tray icon.
...
* Fixes Tempate image doesn't show correctly in dark mode.
* Fixes the tray icon is stretched showing in menubar.
* Fixes title color will not reversed in dark mode.
2015-07-29 13:45:01 +08:00
Cheng Zhao
edde653d60
Merge branch 'feature/modifiers-click-tray' of https://github.com/nishanths/electron into nishanths-feature/modifiers-click-tray
2015-07-29 12:19:17 +08:00
Nishanth Shanmugham
74b4522195
Add keyboard modifiers payload to tray click events
...
* Add keyboard and mouse button bitsum to Tray click events payload
* Move getBoundsFromRect: to common event_util file
* Update documentation
2015-07-27 03:15:51 -07:00
Nishanth Shanmugham
f53995d555
Send bounding Rect on tray double click events
2015-07-25 20:56:35 -07:00
Haojian Wu
d342c9a6df
Implement 'drop-files' tray event on OS X.
2015-07-20 20:06:15 +08:00
Haojian Wu
2cd6ad1a97
More code style fixing.
2015-07-16 18:42:20 +08:00
Haojian Wu
736fe0c1db
Fix OS X build error.
2015-07-16 11:43:42 +08:00
Haojian Wu
4421fbf9f3
Implement 'tray.popContextMenu' API on OS X.
2015-07-16 10:50:53 +08:00
Haojian Wu
002eb1a326
Simplify code logic and fix object-c code style.
2015-07-16 10:49:55 +08:00
Haojian Wu
cca4f4abd5
Implement 'right-clicked' tray event on OS X.
2015-07-15 19:32:00 +08:00
Haojian Wu
e54fda6b34
Introduce Electron custom statusItem view.
...
Reimplement tray functions on OS X by using custom statusItem view.
2015-07-15 18:26:39 +08:00
Cheng Zhao
ce042d0524
mac: Don't use [NSScreen mainScreen]
2015-05-10 16:51:18 +08:00
Cheng Zhao
f5cf3556b1
Pass bounds in clicked event of tray
2015-05-04 11:43:22 +08:00
deepak1556
6d7d068e49
tray: send tray icon position as payload onclick OSX
2015-05-01 19:30:01 +05:30