Commit 3a0b40ff authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

menu: Take the MF_DEFAULT flag in to account in MENU_CalcItemSize.

parent 3e47c82e
......@@ -1026,10 +1026,14 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
/* it must be a text item - unless it's the system menu */
if (!(lpitem->fType & MF_SYSMENU) && lpitem->text) {
HFONT hfontOld = NULL;
RECT rc = lpitem->rect;
LONG txtheight, txtwidth;
lpitem->xTab = 0;
if ( lpitem->fState & MFS_DEFAULT ) {
hfontOld = SelectObject( hdc, get_menu_font(TRUE) );
}
if (menuBar) {
txtheight = DrawTextW( hdc, lpitem->text, -1, &rc,
DT_SINGLELINE|DT_CALCRECT);
......@@ -1071,6 +1075,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
itemheight = max( itemheight,
max( txtheight + 2, menucharsize.cy + 4));
}
if (hfontOld) SelectObject (hdc, hfontOld);
} else if( menuBar) {
itemheight = max( itemheight, GetSystemMetrics(SM_CYMENU)-1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment