[WIN32SS][NTUSER] Fix MENU_DrawScrollArrows (#1753)

Fix drawing the menu scrolling arrows. CORE-13211
This commit is contained in:
Katayama Hirofumi MZ 2019-08-08 13:56:23 +09:00 committed by GitHub
parent 304e281099
commit 65e4efd475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
/***********************************************************************