Add API to get top bar height on macOS
This commit is contained in:
parent
a6e11d3b63
commit
b2f1cdfbae
5 changed files with 28 additions and 1 deletions
15
atom/browser/api/atom_api_screen_mac.mm
Normal file
15
atom/browser/api/atom_api_screen_mac.mm
Normal file
|
@ -0,0 +1,15 @@
|
|||
#import "atom/browser/api/atom_api_screen.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace api {
|
||||
#if defined(OS_MACOSX)
|
||||
int Screen::getMenuBarHeight(){
|
||||
return [[NSApp mainMenu] menuBarHeight];
|
||||
}
|
||||
#endif
|
||||
}// namespace api
|
||||
|
||||
}// namespace atom
|
Loading…
Add table
Add a link
Reference in a new issue