From 0d4f1abdf92bdb02a91fb51cdde06106cc3c59a2 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 23 May 2016 21:54:06 +0900 Subject: [PATCH] Move the menu sightly higher when repositioning the menu Otherwise the menu is not able to show the last menu item and the arrow will show. --- atom/browser/api/atom_api_menu_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_menu_mac.mm b/atom/browser/api/atom_api_menu_mac.mm index 56a00451055..117e8c0df7e 100644 --- a/atom/browser/api/atom_api_menu_mac.mm +++ b/atom/browser/api/atom_api_menu_mac.mm @@ -54,7 +54,7 @@ void MenuMac::PopupAt(Window* window, int x, int y, int positioning_item) { CGFloat windowBottom = CGRectGetMinY([view window].frame); CGFloat distaceFromBottom = windowBottom + position.y - [menu size].height; if (distaceFromBottom < 0) - position.y = position.y - distaceFromBottom; + position.y = position.y - distaceFromBottom + 4; } // Place the menu left of cursor if it is overflowing off right of screen.