diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-09-09 18:53:23 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-09-09 18:53:23 +0300 |
commit | e9da22cecc526087b62c39c5d0824ec918b874bc (patch) | |
tree | 0e72cc27fae2f83936ec8b4b5c9e76533065d144 /indra/newview/llviewerwindow.cpp | |
parent | 281ebb322e2e3d40bc35a7177542ad55a515faa2 (diff) |
SL-18110 Reshape status bar container when hiding navigation panel
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
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); +} //---------------------------------------------------------------------------- |