The menu could leave the screen to the left, this fixes bug #902.

Patch by sil2100.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19048 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-10-11 18:05:57 +00:00
parent 57d9d07781
commit 3cdc3291b4

View File

@ -1681,6 +1681,9 @@ BMenu::CalcFrame(BPoint where, bool *scrollOn)
if (frame.right > screenFrame.right)
frame.OffsetBy(-superItem->Frame().Width() - frame.Width() - 2, 0);
if (frame.left < 0)
frame.OffsetBy(-frame.left + 6, 0);
if (frame.bottom > screenFrame.bottom)
frame.OffsetBy(0, screenFrame.bottom - frame.bottom);
} else {