This commit is contained in:
Kevin Sawicki 2017-06-05 10:33:46 -07:00
parent e9aa9eaf5e
commit 653ef6f839
3 changed files with 4 additions and 3 deletions

View file

@ -39,9 +39,11 @@ class Screen : public mate::EventEmitter<Screen>,
std::vector<display::Display> GetAllDisplays();
display::Display GetDisplayNearestPoint(const gfx::Point& point);
display::Display GetDisplayMatching(const gfx::Rect& match_rect);
#if defined(OS_MACOSX)
int getMenuBarHeight();
#endif
// display::DisplayObserver:
void OnDisplayAdded(const display::Display& new_display) override;
void OnDisplayRemoved(const display::Display& old_display) override;

View file

@ -8,6 +8,7 @@
namespace atom {
namespace api {
int Screen::getMenuBarHeight() {
return [[NSApp mainMenu] menuBarHeight];
}

View file

@ -97,9 +97,7 @@ The current absolute position of the mouse pointer.
### `screen.getMenuBarHeight()` _macOS_
Returns `Integer` - Height
The height of toolbar in pixels.
Returns `Integer` - The height of the menu bar in pixels.
### `screen.getPrimaryDisplay()`