x_offset -> xOffset

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24213 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2008-03-03 12:29:07 +00:00
parent e2fed6bae3
commit 495949fc2c
1 changed files with 7 additions and 7 deletions

View File

@ -1641,28 +1641,28 @@ BMenu::_UpdateStateOpenSelect(BMenuItem* item, BPoint position,
fSelected->Submenu()->Bounds()); fSelected->Submenu()->Bounds());
fSelected->Submenu()->UnlockLooper(); fSelected->Submenu()->UnlockLooper();
float x_offset; float xOffset;
// navAreaRectAbove and navAreaRectBelow have the same X // navAreaRectAbove and navAreaRectBelow have the same X
// position and width, so it doesn't matter which one we use to // position and width, so it doesn't matter which one we use to
// calculate the X offset // calculate the X offset
if (menuBounds.left < submenuBounds.left) if (menuBounds.left < submenuBounds.left)
x_offset = position.x - navAreaRectAbove.left; xOffset = position.x - navAreaRectAbove.left;
else else
x_offset = navAreaRectAbove.right - position.x; xOffset = navAreaRectAbove.right - position.x;
bool inNavArea; bool inNavArea;
if (inNavAreaRectAbove) { if (inNavAreaRectAbove) {
float y_offset = navAreaRectAbove.bottom - position.y; float yOffset = navAreaRectAbove.bottom - position.y;
float ratio = navAreaRectAbove.Width() / navAreaRectAbove.Height(); float ratio = navAreaRectAbove.Width() / navAreaRectAbove.Height();
inNavArea = y_offset <= x_offset / ratio; inNavArea = yOffset <= xOffset / ratio;
} else { } else {
float y_offset = navAreaRectBelow.bottom - position.y; float yOffset = navAreaRectBelow.bottom - position.y;
float ratio = navAreaRectBelow.Width() / navAreaRectBelow.Height(); float ratio = navAreaRectBelow.Width() / navAreaRectBelow.Height();
inNavArea = y_offset >= (navAreaRectBelow.Height() - x_offset / ratio); inNavArea = yOffset >= (navAreaRectBelow.Height() - xOffset / ratio);
} }
bigtime_t systime = system_time(); bigtime_t systime = system_time();