user32: Remove the height parameter from MENU_DrawMenuItem().
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8984974868
commit
e42bcbdea3
|
@ -1392,8 +1392,8 @@ static void draw_popup_arrow( HDC hdc, RECT rect, UINT arrow_bitmap_width,
|
||||||
*
|
*
|
||||||
* Draw a single menu item.
|
* Draw a single menu item.
|
||||||
*/
|
*/
|
||||||
static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, MENUITEM *lpitem,
|
static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
UINT height, BOOL menuBar, UINT odaction )
|
MENUITEM *lpitem, BOOL menuBar, UINT odaction )
|
||||||
{
|
{
|
||||||
RECT rect;
|
RECT rect;
|
||||||
BOOL flat_menu = FALSE;
|
BOOL flat_menu = FALSE;
|
||||||
|
@ -1534,7 +1534,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
|
|
||||||
rc.left -= MENU_COL_SPACE / 2 + 1;
|
rc.left -= MENU_COL_SPACE / 2 + 1;
|
||||||
rc.top = 3;
|
rc.top = 3;
|
||||||
rc.bottom = height - 3;
|
rc.bottom = menu->Height - 3;
|
||||||
if (flat_menu)
|
if (flat_menu)
|
||||||
{
|
{
|
||||||
oldPen = SelectObject( hdc, SYSCOLOR_GetPen(COLOR_BTNSHADOW) );
|
oldPen = SelectObject( hdc, SYSCOLOR_GetPen(COLOR_BTNSHADOW) );
|
||||||
|
@ -1799,7 +1799,7 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
|
||||||
item = menu->items;
|
item = menu->items;
|
||||||
for (u = menu->nItems; u > 0; u--, item++)
|
for (u = menu->nItems; u > 0; u--, item++)
|
||||||
MENU_DrawMenuItem( hwnd, hmenu, menu->hwndOwner, hdc,
|
MENU_DrawMenuItem( hwnd, hmenu, menu->hwndOwner, hdc,
|
||||||
item, menu->Height, FALSE, ODA_DRAWENTIRE );
|
item, FALSE, ODA_DRAWENTIRE );
|
||||||
}
|
}
|
||||||
/* draw scroll arrows */
|
/* draw scroll arrows */
|
||||||
if (menu->bScrolling)
|
if (menu->bScrolling)
|
||||||
|
@ -2026,8 +2026,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
|
||||||
{
|
{
|
||||||
lppop->items[lppop->FocusedItem].fState &= ~(MF_HILITE|MF_MOUSESELECT);
|
lppop->items[lppop->FocusedItem].fState &= ~(MF_HILITE|MF_MOUSESELECT);
|
||||||
MENU_DrawMenuItem( lppop->hWnd, hmenu, hwndOwner, hdc, &lppop->items[lppop->FocusedItem],
|
MENU_DrawMenuItem( lppop->hWnd, hmenu, hwndOwner, hdc, &lppop->items[lppop->FocusedItem],
|
||||||
lppop->Height, !(lppop->wFlags & MF_POPUP),
|
!(lppop->wFlags & MF_POPUP), ODA_SELECT );
|
||||||
ODA_SELECT );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Highlight new item (if any) */
|
/* Highlight new item (if any) */
|
||||||
|
@ -2037,8 +2036,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
|
||||||
if(!(lppop->items[wIndex].fType & MF_SEPARATOR)) {
|
if(!(lppop->items[wIndex].fType & MF_SEPARATOR)) {
|
||||||
lppop->items[wIndex].fState |= MF_HILITE;
|
lppop->items[wIndex].fState |= MF_HILITE;
|
||||||
MENU_EnsureMenuItemVisible(lppop, wIndex, hdc);
|
MENU_EnsureMenuItemVisible(lppop, wIndex, hdc);
|
||||||
MENU_DrawMenuItem( lppop->hWnd, hmenu, hwndOwner, hdc,
|
MENU_DrawMenuItem( lppop->hWnd, hmenu, hwndOwner, hdc, &lppop->items[wIndex],
|
||||||
&lppop->items[wIndex], lppop->Height,
|
|
||||||
!(lppop->wFlags & MF_POPUP), ODA_SELECT );
|
!(lppop->wFlags & MF_POPUP), ODA_SELECT );
|
||||||
}
|
}
|
||||||
if (sendMenuSelect)
|
if (sendMenuSelect)
|
||||||
|
@ -2372,7 +2370,7 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
|
||||||
SelectObject( hdc, get_menu_font(FALSE));
|
SelectObject( hdc, get_menu_font(FALSE));
|
||||||
|
|
||||||
item->fState |= MF_HILITE;
|
item->fState |= MF_HILITE;
|
||||||
MENU_DrawMenuItem( menu->hWnd, hmenu, hwndOwner, hdc, item, menu->Height, !(menu->wFlags & MF_POPUP), ODA_DRAWENTIRE );
|
MENU_DrawMenuItem( menu->hWnd, hmenu, hwndOwner, hdc, item, !(menu->wFlags & MF_POPUP), ODA_DRAWENTIRE );
|
||||||
ReleaseDC( menu->hWnd, hdc );
|
ReleaseDC( menu->hWnd, hdc );
|
||||||
}
|
}
|
||||||
if (!item->rect.top && !item->rect.left && !item->rect.bottom && !item->rect.right)
|
if (!item->rect.top && !item->rect.left && !item->rect.bottom && !item->rect.right)
|
||||||
|
@ -4466,10 +4464,8 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFO
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < lppop->nItems; i++)
|
for (i = 0; i < lppop->nItems; i++)
|
||||||
{
|
MENU_DrawMenuItem( hwnd, hMenu, hwnd, hDC, &lppop->items[i], TRUE, ODA_DRAWENTIRE );
|
||||||
MENU_DrawMenuItem( hwnd, hMenu, hwnd,
|
|
||||||
hDC, &lppop->items[i], lppop->Height, TRUE, ODA_DRAWENTIRE );
|
|
||||||
}
|
|
||||||
retvalue = lppop->Height;
|
retvalue = lppop->Height;
|
||||||
|
|
||||||
END:
|
END:
|
||||||
|
|
Loading…
Reference in New Issue