diff options
author | Merov Linden <merov@lindenlab.com> | 2011-10-12 18:13:01 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-10-12 18:13:01 -0700 |
commit | 40ebe180a6592381804555d1c9e8df84bf35345a (patch) | |
tree | 523d687dedb2921d30e1d553184a8caa87ee3c45 /indra/newview/llmoveview.cpp | |
parent | aa1f0215c764fa346625ace43c467a0e0f803057 (diff) | |
parent | 1181e7c75747361e1a57f083cf82c63ef152bfc5 (diff) |
Pull from richard/viewer-experience-fui
Diffstat (limited to 'indra/newview/llmoveview.cpp')
-rw-r--r-- | indra/newview/llmoveview.cpp | 21 |
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 |