Skip to content

Commit

Permalink
🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsawicki committed Jun 5, 2017
1 parent e9aa9ea commit 653ef6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions atom/browser/api/atom_api_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions atom/browser/api/atom_api_screen_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace atom {

namespace api {

int Screen::getMenuBarHeight() {
return [[NSApp mainMenu] menuBarHeight];
}
Expand Down
4 changes: 1 addition & 3 deletions docs/api/screen.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`

Expand Down

0 comments on commit 653ef6f

Please sign in to comment.