diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.h | 2 |
3 files changed, 29 insertions, 6 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9036e87514..3fd5c3e9bb 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 ae9da97642..76ef71971c 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 979a560508..1927e01ddb 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -177,6 +177,8 @@ public: bool getUIVisibility(); void handlePieMenu(S32 x, S32 y, MASK mask); + void reshapeStatusBarContainer(); + BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down); // |