summaryrefslogtreecommitdiff
path: root/indra/newview/llnavigationbar.cpp
diff options
context:
space:
mode:
authorPaul ProductEngine <pguslisty@productengine.com>2011-09-19 19:13:39 +0300
committerPaul ProductEngine <pguslisty@productengine.com>2011-09-19 19:13:39 +0300
commit5baf0de6a396b120aba4e2351ed5bff70f2562ef (patch)
tree03bd4d769d173ac7cc969cc2a8486eb2da338b1d /indra/newview/llnavigationbar.cpp
parent1c57963673193d5a3da638848c0540a5fbc91603 (diff)
EXP-1203 FIXED (As a FUI user, I want the address bar and favorites to be on one line)
- Relocated address bar, combined with favorite landmarks EXP-1208 - Added dragger to change amount of space allocated to address bar and favorites bar EXP-1217 - Modified Favorites ->> More spillover EXP-1218 - Combined context menu menuitems for favorites & address bars EXP-1219
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);
-}