diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llmoveview.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 |
2 files changed, 12 insertions, 11 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 diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index da1b149b59..0cbbfae002 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -373,8 +373,6 @@ void set_underclothes_menu_options() void init_menus() { - S32 top = gViewerWindow->getRootView()->getRect().getHeight(); - // Initialize actions initialize_menus(); |