diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9036e875142f835284c93be04290aca4bcd1e37e..3fd5c3e9bb2d069e904b65862c0ce753bf3e9a7f 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -616,7 +616,7 @@ bool toggle_show_navigation_panel(const LLSD& newvalue) LLNavigationBar::getInstance()->setVisible(value); gSavedSettings.setBOOL("ShowMiniLocationPanel", !value); - + gViewerWindow->reshapeStatusBarContainer(); return true; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ae9da976425d0dc16d671e0f57bd74e95e4842c0..76ef71971c734d979b22609ab7641ebc8f609410 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2246,16 +2246,16 @@ void LLViewerWindow::initWorldUI() nav_bar_container->addChild(navbar); nav_bar_container->setVisible(TRUE); - // Navigation bar is outside visible area, expand status_bar_container to show it - S32 new_height = nav_bar_container->getRect().getHeight() + status_bar_container->getRect().getHeight(); - S32 new_width = status_bar_container->getRect().getWidth(); - status_bar_container->reshape(new_width, new_height, TRUE); - if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { navbar->setVisible(FALSE); } + else + { + reshapeStatusBarContainer(); + } + // Top Info bar LLPanel* topinfo_bar_container = getRootView()->getChild<LLPanel>("topinfo_bar_container"); @@ -5847,6 +5847,27 @@ LLRect LLViewerWindow::getChatConsoleRect() return console_rect; } + +void LLViewerWindow::reshapeStatusBarContainer() +{ + LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container"); + LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container"); + + S32 new_height = status_bar_container->getRect().getHeight(); + S32 new_width = status_bar_container->getRect().getWidth(); + + if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) + { + // Navigation bar is outside visible area, expand status_bar_container to show it + new_height += nav_bar_container->getRect().getHeight(); + } + else + { + // collapse status_bar_container + new_height -= nav_bar_container->getRect().getHeight(); + } + status_bar_container->reshape(new_width, new_height, TRUE); +} //---------------------------------------------------------------------------- diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 979a560508635d334d85ba137a4e1aa3e7169360..1927e01ddba4f8ccbed3c93c5161f699f76bf95a 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -177,6 +177,8 @@ class LLViewerWindow : public LLWindowCallbacks bool getUIVisibility(); void handlePieMenu(S32 x, S32 y, MASK mask); + void reshapeStatusBarContainer(); + BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down); //