https://git.reactos.org/?p=reactos.git;a=commitdiff;h=65e4efd475e98b970fa5a…
commit 65e4efd475e98b970fa5add48a13fd6360997d62
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Aug 8 13:56:23 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Aug 8 13:56:23 2019 +0900
[WIN32SS][NTUSER] Fix MENU_DrawScrollArrows (#1753)
Fix drawing the menu scrolling arrows. CORE-13211
---
win32ss/user/ntuser/menu.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index 3ff90e9e330..13af632520d 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -2177,11 +2177,10 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect, PMENU
lppop, PWND pwnd
*/
static void MENU_DrawScrollArrows(PMENU lppop, HDC hdc)
{
- UINT arrow_bitmap_width, arrow_bitmap_height;
- RECT rect, dfcrc;
+ UINT arrow_bitmap_height;
+ RECT rect;
UINT Flags = 0;
- arrow_bitmap_width = gpsi->oembmi[OBI_DNARROW].cx;
arrow_bitmap_height = gpsi->oembmi[OBI_DNARROW].cy;
rect.left = 0;
@@ -2189,22 +2188,14 @@ static void MENU_DrawScrollArrows(PMENU lppop, HDC hdc)
rect.right = lppop->cxMenu;
rect.bottom = arrow_bitmap_height;
FillRect(hdc, &rect, IntGetSysColorBrush(COLOR_MENU));
- dfcrc.left = (lppop->cxMenu - arrow_bitmap_width) / 2;
- dfcrc.top = 0;
- dfcrc.right = arrow_bitmap_width;
- dfcrc.bottom = arrow_bitmap_height;
- DrawFrameControl(hdc, &dfcrc, DFC_MENU, (lppop->iTop ? 0 :
DFCS_INACTIVE)|DFCS_MENUARROWUP);
+ DrawFrameControl(hdc, &rect, DFC_MENU, (lppop->iTop ? 0 :
DFCS_INACTIVE)|DFCS_MENUARROWUP);
rect.top = lppop->cyMenu - arrow_bitmap_height;
rect.bottom = lppop->cyMenu;
FillRect(hdc, &rect, IntGetSysColorBrush(COLOR_MENU));
if (!(lppop->iTop < lppop->iMaxTop - (MENU_GetMaxPopupHeight(lppop) - 2 *
arrow_bitmap_height)))
Flags = DFCS_INACTIVE;
- dfcrc.left = (lppop->cxMenu - arrow_bitmap_width) / 2;
- dfcrc.top = lppop->cyMenu - arrow_bitmap_height;
- dfcrc.right = arrow_bitmap_width;
- dfcrc.bottom = lppop->cyMenu;
- DrawFrameControl(hdc, &dfcrc, DFC_MENU, Flags|DFCS_MENUARROWDOWN);
+ DrawFrameControl(hdc, &rect, DFC_MENU, Flags|DFCS_MENUARROWDOWN);
}
/***********************************************************************