https://git.reactos.org/?p=reactos.git;a=commitdiff;h=65f09260869f98ee06616d...
commit 65f09260869f98ee06616db9522b52eda1ace2af Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Fri Dec 28 12:12:42 2018 +0900 Commit: GitHub noreply@github.com CommitDate: Fri Dec 28 12:12:42 2018 +0900
[MENU][WIN32SS] Fix non-menubar menu text Y position (#1199)
CORE-15226 --- win32ss/user/ntuser/menu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index a708729914..f2357fe538 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -71,7 +71,7 @@ BOOL fInEndMenu = FALSE; #define MENU_COL_SPACE 4
/* top and bottom margins for popup menus */ -#define MENU_TOP_MARGIN 2 //3 +#define MENU_TOP_MARGIN 3 #define MENU_BOTTOM_MARGIN 2
#define MENU_ITEM_HBMP_SPACE (5) @@ -2380,7 +2380,7 @@ static void FASTCALL MENU_DrawMenuItem(PWND Wnd, PMENU Menu, PWND WndOwner, HDC
rc.left++; rc.right--; - rc.top = ( rc.top + rc.bottom) / 2; + rc.top = (rc.top + rc.bottom) / 2 - 1; if (flat_menu) { oldPen = NtGdiSelectPen( hdc, NtGdiGetStockObject(DC_PEN) ); @@ -2539,6 +2539,9 @@ static void FASTCALL MENU_DrawMenuItem(PWND Wnd, PMENU Menu, PWND WndOwner, HDC RECTL_vOffsetRect(&rect, +1, +1); }
+ if (!menuBar) + --rect.bottom; + if(lpitem->fState & MF_GRAYED) { if (!(lpitem->fState & MF_HILITE) ) @@ -2580,6 +2583,9 @@ static void FASTCALL MENU_DrawMenuItem(PWND Wnd, PMENU Menu, PWND WndOwner, HDC DrawTextW( hdc, Text + i + 1, -1, &rect, uFormat ); }
+ if (!menuBar) + ++rect.bottom; + if (menuBar && !flat_menu && (lpitem->fState & (MF_HILITE | MF_GRAYED)) == MF_HILITE)