Fixed the text color of higlighted menu bar item for the Win98 look.
Clicking on a separator should not close the menu. Do not right align 'bitmap' items and the help menu for the Win9x look and feels.
This commit is contained in:
parent
7f0490e3f3
commit
93fd46af54
|
@ -1024,20 +1024,21 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect,
|
||||||
lprect->bottom = maxY;
|
lprect->bottom = maxY;
|
||||||
lppop->Height = lprect->bottom - lprect->top;
|
lppop->Height = lprect->bottom - lprect->top;
|
||||||
|
|
||||||
/* Flush right all magic items and items between the MF_HELP and */
|
if (TWEAK_WineLook == WIN31_LOOK) {
|
||||||
/* the last item (if several lines, only move the last line) */
|
/* Flush right all magic items and items between the MF_HELP and */
|
||||||
lpitem = &lppop->items[lppop->nItems-1];
|
/* the last item (if several lines, only move the last line) */
|
||||||
orgY = lpitem->rect.top;
|
lpitem = &lppop->items[lppop->nItems-1];
|
||||||
orgX = lprect->right;
|
orgY = lpitem->rect.top;
|
||||||
for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--)
|
orgX = lprect->right;
|
||||||
{
|
for (i = lppop->nItems - 1; i >= helpPos; i--, lpitem--) {
|
||||||
if ( !IS_BITMAP_ITEM(lpitem->fType) && ((helpPos ==-1) ? TRUE : (helpPos>i) ))
|
if ( !IS_BITMAP_ITEM(lpitem->fType) && ((helpPos==-1) || (helpPos>i) ))
|
||||||
break; /* done */
|
break; /* done */
|
||||||
if (lpitem->rect.top != orgY) break; /* Other line */
|
if (lpitem->rect.top != orgY) break; /* Other line */
|
||||||
if (lpitem->rect.right >= orgX) break; /* Too far right already */
|
if (lpitem->rect.right >= orgX) break; /* Too far right already */
|
||||||
lpitem->rect.left += orgX - lpitem->rect.right;
|
lpitem->rect.left += orgX - lpitem->rect.right;
|
||||||
lpitem->rect.right = orgX;
|
lpitem->rect.right = orgX;
|
||||||
orgX = lpitem->rect.left;
|
orgX = lpitem->rect.left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1170,6 +1171,8 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
{
|
{
|
||||||
if (lpitem->fState & MF_GRAYED)
|
if (lpitem->fState & MF_GRAYED)
|
||||||
SetTextColor( hdc, GetSysColor( COLOR_GRAYTEXT ) );
|
SetTextColor( hdc, GetSysColor( COLOR_GRAYTEXT ) );
|
||||||
|
else if ((menuBar) && (TWEAK_WineLook==WIN98_LOOK))
|
||||||
|
SetTextColor( hdc, GetSysColor( COLOR_MENUTEXT ) );
|
||||||
else
|
else
|
||||||
SetTextColor( hdc, GetSysColor( COLOR_HIGHLIGHTTEXT ) );
|
SetTextColor( hdc, GetSysColor( COLOR_HIGHLIGHTTEXT ) );
|
||||||
SetBkColor( hdc, GetSysColor( COLOR_HIGHLIGHT ) );
|
SetBkColor( hdc, GetSysColor( COLOR_HIGHLIGHT ) );
|
||||||
|
@ -2261,7 +2264,7 @@ static INT MENU_ExecFocusedItem( MTRACKER* pmt, HMENU hMenu, UINT wFlags )
|
||||||
|
|
||||||
if (!(item->fType & MF_POPUP))
|
if (!(item->fType & MF_POPUP))
|
||||||
{
|
{
|
||||||
if (!(item->fState & (MF_GRAYED | MF_DISABLED)))
|
if (!(item->fState & (MF_GRAYED | MF_DISABLED)) && !(item->fType & MF_SEPARATOR))
|
||||||
{
|
{
|
||||||
/* If TPM_RETURNCMD is set you return the id, but
|
/* If TPM_RETURNCMD is set you return the id, but
|
||||||
do not send a message to the owner */
|
do not send a message to the owner */
|
||||||
|
|
Loading…
Reference in New Issue