BMenuItem didn't draw the modifier indicator for B_OPTION_KEY. Fixes ticket #3887

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30661 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2009-05-07 19:45:42 +00:00
parent 943b557055
commit a48d16a026
2 changed files with 28 additions and 3 deletions
+5 -1
View File
@@ -2025,7 +2025,7 @@ BMenu::_ComputeColumnLayout(int32 index, bool bestFit, bool moveItems,
bool command = false;
bool control = false;
bool shift = false;
bool option = false;
if (index > 0)
frame = ItemAt(index - 1)->Frame();
else
@@ -2045,6 +2045,8 @@ BMenu::_ComputeColumnLayout(int32 index, bool bestFit, bool moveItems,
control = true;
if (item->fModifiers & B_SHIFT_KEY)
shift = true;
if (item->fModifiers & B_OPTION_KEY)
option = true;
}
item->fBounds.left = 0.0f;
@@ -2063,6 +2065,8 @@ BMenu::_ComputeColumnLayout(int32 index, bool bestFit, bool moveItems,
frame.right += 17;
if (control)
frame.right += 17;
if (option)
frame.right += 17;
if (shift)
frame.right += 22;