From 957f1f98efd193336e7afbb5e981f0c8994fbf9f Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Tue, 4 Jun 2002 23:08:16 +0000 Subject: [PATCH] Only allow tabs in popup menus, and make sure to never display them. --- controls/menu.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/controls/menu.c b/controls/menu.c index 949d71bb379..dcaedebdb8b 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -1374,16 +1374,13 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, { rect.left += MENU_BAR_ITEMS_SPACE / 2; rect.right -= MENU_BAR_ITEMS_SPACE / 2; - i = strlenW( lpitem->text ); - } - else - { - for (i = 0; lpitem->text[i]; i++) - if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b')) - break; } - if( !(TWEAK_WineLook == WIN31_LOOK) && (lpitem->fState & MF_GRAYED)) + for (i = 0; lpitem->text[i]; i++) + if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b')) + break; + + if( (TWEAK_WineLook != WIN31_LOOK) && (lpitem->fState & MF_GRAYED)) { if (!(lpitem->fState & MF_HILITE) ) { @@ -1398,7 +1395,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc, DrawTextW( hdc, lpitem->text, i, &rect, uFormat); /* paint the shortcut text */ - if (lpitem->text[i]) /* There's a tab or flush-right char */ + if (!menuBar && lpitem->text[i]) /* There's a tab or flush-right char */ { if (lpitem->text[i] == '\t') {