diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-08-11 23:03:14 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-08-12 00:39:42 +0300 |
commit | 1de8306c830611d22e9d684ad1372e6f506f21af (patch) | |
tree | 17c35e66847f8a0c77f23da9d7ede51df0252776 /indra/newview/llviewerwindow.cpp | |
parent | fd8b052b3212ab3b16fca716c8d190822e4d6ac8 (diff) |
SL-17965 Closing some floaters shifts focus to menu bar
Focus root now only covers menu, status and nav bar to not steal focus from floaters
This partially reverts commit 1d6bfb727a8015e82cd4060a0c73cf3fc719e818.
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cf243f085f..ebbc9c0681 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2224,26 +2224,31 @@ void LLViewerWindow::initWorldUI() // Force gFloaterTools to initialize LLFloaterReg::getInstance("build"); - // Status bar LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container"); gStatusBar = new LLStatusBar(status_bar_container->getLocalRect()); - gStatusBar->setFollowsAll(); + gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT); gStatusBar->setShape(status_bar_container->getLocalRect()); // sync bg color with menu bar gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() ); // add InBack so that gStatusBar won't be drawn over menu - status_bar_container->addChildInBack(gStatusBar); - status_bar_container->setVisible(TRUE); + status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/); + status_bar_container->setVisible(TRUE); // Navigation bar - LLPanel* nav_bar_container = getRootView()->getChild<LLPanel>("nav_bar_container"); + LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container"); LLNavigationBar* navbar = LLNavigationBar::getInstance(); navbar->setShape(nav_bar_container->getLocalRect()); navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get()); 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")) { |