EXP-128 FIX Stand button displays partially offscreen

master
Richard Linden 2010-09-30 20:19:24 -07:00
parent 1f7ff277d4
commit 93faa08da9
1 changed files with 7 additions and 2 deletions

View File

@ -740,12 +740,17 @@ void LLPanelStandStopFlying::updatePosition()
LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
S32 x = 0;
if (movement_btn)
{
// Align centers of the button and the panel.
S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
setOrigin(x, 0);
x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
}
else
{
x = tray->calcScreenRect().getCenterX() - getRect().getWidth()/2;
}
setOrigin(x, 0);
}