summaryrefslogtreecommitdiff
path: root/indra/newview/llnavigationbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnavigationbar.cpp')
-rw-r--r--indra/newview/llnavigationbar.cpp148
1 files changed, 0 insertions, 148 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 9d54ad7463..133168f0ba 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -736,151 +736,3 @@ int LLNavigationBar::getDefFavBarHeight()
{
return mDefaultFpRect.getHeight();
}
-
-void LLNavigationBar::showNavigationPanel(BOOL visible)
-{
- bool fpVisible = gSavedSettings.getBOOL("ShowNavbarFavoritesPanel");
-
- LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite");
- LLPanel* navPanel = getChild<LLPanel>("navigation_panel");
-
- LLRect nbRect(getRect());
- LLRect fbRect(fb->getRect());
-
- navPanel->setVisible(visible);
-
- if (visible)
- {
- if (fpVisible)
- {
- // Navigation Panel must be shown. Favorites Panel is visible.
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), mDefaultNbRect.getHeight());
- fbRect.setLeftTopAndSize(fbRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight());
-
- // this is duplicated in 'else' section because it should be called BEFORE fb->reshape
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- // propagate size to parent container
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
-
- fb->reshape(fbRect.getWidth(), fbRect.getHeight());
- fb->setRect(fbRect);
- }
- else
- {
- // Navigation Panel must be shown. Favorites Panel is hidden.
-
- S32 height = mDefaultNbRect.getHeight() - mDefaultFpRect.getHeight() - FAVBAR_TOP_PADDING;
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), height);
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
- }
- }
- else
- {
- if (fpVisible)
- {
- // Navigation Panel must be hidden. Favorites Panel is visible.
-
- S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING;
- S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight);
- fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight());
-
- // this is duplicated in 'else' section because it should be called BEFORE fb->reshape
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
-
- fb->reshape(fbRect.getWidth(), fbRect.getHeight());
- fb->setRect(fbRect);
- }
- else
- {
- // Navigation Panel must be hidden. Favorites Panel is hidden.
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0);
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
- }
- }
-
- getChildView("bg_icon")->setVisible( visible && fpVisible);
- getChildView("bg_icon_no_fav_bevel")->setVisible( visible && !fpVisible);
- getChildView("bg_icon_no_nav_bevel")->setVisible( !visible && fpVisible);
-}
-
-void LLNavigationBar::showFavoritesPanel(BOOL visible)
-{
- bool npVisible = gSavedSettings.getBOOL("ShowNavbarNavigationPanel");
-
- LLFavoritesBarCtrl* fb = getChild<LLFavoritesBarCtrl>("favorite");
-
- LLRect nbRect(getRect());
- LLRect fbRect(fb->getRect());
-
- if (visible)
- {
- if (npVisible)
- {
- // Favorites Panel must be shown. Navigation Panel is visible.
-
- S32 fbHeight = fbRect.getHeight();
- S32 newHeight = nbRect.getHeight() + fbHeight + FAVBAR_TOP_PADDING;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
- fbRect.setLeftTopAndSize(mDefaultFpRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight());
- }
- else
- {
- // Favorites Panel must be shown. Navigation Panel is hidden.
-
- S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING;
- S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight);
- fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight());
- }
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
-
- fb->reshape(fbRect.getWidth(), fbRect.getHeight());
- fb->setRect(fbRect);
- }
- else
- {
- if (npVisible)
- {
- // Favorites Panel must be hidden. Navigation Panel is visible.
-
- S32 fbHeight = fbRect.getHeight();
- S32 newHeight = nbRect.getHeight() - fbHeight - FAVBAR_TOP_PADDING;
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
- }
- else
- {
- // Favorites Panel must be hidden. Navigation Panel is hidden.
-
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), 0);
- }
-
- reshape(nbRect.getWidth(), nbRect.getHeight());
- setRect(nbRect);
- getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
- }
-
- getChildView("bg_icon")->setVisible( npVisible && visible);
- getChildView("bg_icon_no_fav_bevel")->setVisible( npVisible && !visible);
- getChildView("bg_icon_no_nav_bevel")->setVisible( !npVisible && visible);
-
- fb->setVisible(visible);
-}