From 2cdfcae44bbd86a30cd8278c1b9672b5924d495f Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Tue, 18 Jan 2005 15:10:46 +0000 Subject: [PATCH] The LowColor() had to be resetted after having drawn the shortcut symbol. Corrected a weird typo. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10829 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/MenuItem.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/kits/interface/MenuItem.cpp b/src/kits/interface/MenuItem.cpp index ab67f10414..dc19a5bb31 100644 --- a/src/kits/interface/MenuItem.cpp +++ b/src/kits/interface/MenuItem.cpp @@ -400,8 +400,6 @@ BMenuItem::Draw() fSuper->MovePenTo(ContentLocation()); DrawContent(); - - fSuper->SetLowColor(ui_color(B_MENU_BACKGROUND_COLOR)); if (fSuper->Layout() == B_ITEMS_IN_COLUMN) { if (IsMarked()) @@ -413,6 +411,8 @@ BMenuItem::Draw() if (Submenu()) DrawSubmenuSymbol(); } + + fSuper->SetLowColor(ui_color(B_MENU_BACKGROUND_COLOR)); } @@ -548,13 +548,14 @@ BMenuItem::Invoke(BMessage *message) void BMenuItem::Uninstall() { - if (fSubmenu) + if (fSubmenu != NULL) fSubmenu->Uninstall(); if (Target() == fWindow) SetTarget(BMessenger()); - if (0x6c != 0 && fModifiers & B_COMMAND_KEY && fWindow) + // TODO: I'm not sure about B_COMMAND_KEY + if (fShortcutChar != 0 && (fModifiers & B_COMMAND_KEY) && fWindow != NULL) fWindow->RemoveShortcut(fShortcutChar, fModifiers); fWindow = NULL; @@ -569,7 +570,7 @@ BMenuItem::SetSuper(BMenu *super) fSuper = super; - if (fSubmenu) + if (fSubmenu != NULL) fSubmenu->fSuper = super; }