summaryrefslogtreecommitdiff
path: root/indra/newview/llmoveview.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-10-12 17:50:03 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-10-12 17:50:03 -0700
commit1181e7c75747361e1a57f083cf82c63ef152bfc5 (patch)
tree03d41962e61ccbbe40d3dac843a0bfe74a81a3b4 /indra/newview/llmoveview.cpp
parent20358ea89dc9823ac0b539030fdf03268dbdf4e9 (diff)
parent3e55263e33fde4ab1ff19e8cfcb55125ee42b70d (diff)
Merge
Diffstat (limited to 'indra/newview/llmoveview.cpp')
-rw-r--r--indra/newview/llmoveview.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 2af01d06c1..c3d8b91d67 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -696,25 +696,28 @@ void LLPanelStandStopFlying::updatePosition()
{
if (mAttached) return;
- S32 x = 0;
- S32 y = 0;
-
- if(LLView* root = getRootView())
+ S32 y_pos = 0;
+ S32 bottom_tb_center = 0;
+ if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom"))
{
- x = root->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+ y_pos = toolbar_bottom->getRect().getHeight();
+ bottom_tb_center = toolbar_bottom->getRect().getCenterX();
}
- if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom"))
+ S32 left_tb_width = 0;
+ if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left"))
{
- y = toolbar_bottom->getRect().getHeight();
+ left_tb_width = toolbar_left->getRect().getWidth();
}
if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("stand_stop_flying_container"))
{
- panel_ssf_container->setOrigin(0, y);
+ panel_ssf_container->setOrigin(0, y_pos);
}
- setOrigin(x, 0);
+ S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width;
+
+ setOrigin( x_pos, 0);
}
// EOF