diff --git a/src/kits/interface/MenuField.cpp b/src/kits/interface/MenuField.cpp index 676afbac73..31aacbdb4f 100644 --- a/src/kits/interface/MenuField.cpp +++ b/src/kits/interface/MenuField.cpp @@ -362,45 +362,16 @@ BMenuField::Draw(BRect update) BRect frame(fMenuBar->Frame()); - if (be_control_look != NULL) { - frame.InsetBy(-kVMargin, -kVMargin); - rgb_color base = fMenuBar->LowColor(); - rgb_color background = LowColor(); - uint32 flags = 0; - if (!fMenuBar->IsEnabled()) - flags |= BControlLook::B_DISABLED; - if (active) - flags |= BControlLook::B_FOCUSED; - be_control_look->DrawMenuFieldFrame(this, frame, update, base, - background, flags); - return; - } - - if (frame.InsetByCopy(-kVMargin, -kVMargin).Intersects(update)) { - SetHighColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_2_TINT)); - StrokeLine(BPoint(frame.left - 1.0f, frame.top - 1.0f), - BPoint(frame.left - 1.0f, frame.bottom - 1.0f)); - StrokeLine(BPoint(frame.left - 1.0f, frame.top - 1.0f), - BPoint(frame.right - 1.0f, frame.top - 1.0f)); - - StrokeLine(BPoint(frame.left + 1.0f, frame.bottom + 1.0f), - BPoint(frame.right + 1.0f, frame.bottom + 1.0f)); - StrokeLine(BPoint(frame.right + 1.0f, frame.top + 1.0f)); - - SetHighColor(tint_color(ui_color(B_MENU_BACKGROUND_COLOR), B_DARKEN_4_TINT)); - StrokeLine(BPoint(frame.left - 1.0f, frame.bottom), - BPoint(frame.left - 1.0f, frame.bottom)); - StrokeLine(BPoint(frame.right, frame.top - 1.0f), - BPoint(frame.right, frame.top - 1.0f)); - } - - if (active || fTransition) { - SetHighColor(active ? ui_color(B_KEYBOARD_NAVIGATION_COLOR) : - ViewColor()); - StrokeRect(frame.InsetByCopy(-kVMargin, -kVMargin)); - - fTransition = false; - } + frame.InsetBy(-kVMargin, -kVMargin); + rgb_color base = fMenuBar->LowColor(); + rgb_color background = LowColor(); + uint32 flags = 0; + if (!fMenuBar->IsEnabled()) + flags |= BControlLook::B_DISABLED; + if (active) + flags |= BControlLook::B_FOCUSED; + be_control_look->DrawMenuFieldFrame(this, frame, update, base, + background, flags); } diff --git a/src/kits/interface/PopUpMenu.cpp b/src/kits/interface/PopUpMenu.cpp index 1e784f20c8..aebd37394b 100644 --- a/src/kits/interface/PopUpMenu.cpp +++ b/src/kits/interface/PopUpMenu.cpp @@ -283,9 +283,11 @@ BPopUpMenu::AsyncAutoDestruct() const BPoint BPopUpMenu::ScreenLocation() { + // This case is when the BPopUpMenu is standalone if (fUseWhere) return fWhere; + // This case is when the BPopUpMenu is inside a BMenuField BMenuItem* superItem = Superitem(); BMenu* superMenu = Supermenu(); BMenuItem* selectedItem = FindItem(superItem->Label()); @@ -421,11 +423,10 @@ BMenuItem* BPopUpMenu::_StartTrack(BPoint where, bool autoInvoke, bool startOpened, BRect* _specialRect) { - fWhere = where; - // I know, this doesn't look senseful, but don't be fooled, // fUseWhere is used in ScreenLocation(), which is a virtual // called by BMenu::Track() + fWhere = where; fUseWhere = true; // Determine when mouse-down-up will be taken as a 'press',