Ticket #8900: align_shortcuts_ticket_8900.patch

File align_shortcuts_ticket_8900.patch, 1.2 KB (added by leavengood, 12 years ago)
  • src/kits/interface/Menu.cpp

    diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp
    index 6905c15..36f8d4b 100644
    a b BMenu::_ComputeColumnLayout(int32 index, bool bestFit, bool moveItems,  
    21842184        item->fBounds.bottom = item->fBounds.top + height + fPad.top
    21852185            + fPad.bottom;
    21862186
    2187         if (item->fSubmenu != NULL)
    2188             width += item->Frame().Height();
     2187        // Always add spacing for the sub-menu arrow
     2188        width += item->Frame().Height();
    21892189
    21902190        frame.right = max_c(frame.right, width + fPad.left + fPad.right);
    21912191        frame.bottom = item->fBounds.bottom;
  • src/kits/interface/MenuItem.cpp

    diff --git a/src/kits/interface/MenuItem.cpp b/src/kits/interface/MenuItem.cpp
    index 98f5e00..41da01e 100644
    a b BMenuItem::_DrawShortcutSymbol()  
    722722    BPoint where = ContentLocation();
    723723    where.x = fBounds.right - font.Size();
    724724
    725     if (fSubmenu)
    726         where.x -= fBounds.Height() - 3;
     725    // Always remove the width of the submenu arrow
     726    where.x -= fBounds.Height() - 3;
    727727
    728728    const float ascent = MenuPrivate(fSuper).Ascent();
    729729    if (fShortcutChar < B_SPACE && kUTF8ControlMap[(int)fShortcutChar])