summaryrefslogtreecommitdiff
path: root/indra/newview/llviewercontrol.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-10-29 10:42:02 -0700
committerSteve Bennetts <steve@lindenlab.com>2009-10-29 10:42:02 -0700
commit95031093c795f3a97cdc673c7b7807c944742ab8 (patch)
tree378e103331e289894bbc915b15772ac844b6ccae /indra/newview/llviewercontrol.cpp
parentfb4e95f7ea0a1f6e900f6ee1de73ec02860ff815 (diff)
parent15687e2acd07ed3c0a56a61af982595b99dc064f (diff)
merge changes from https://hg.aws.productengine.com/secondlife/viewer-2-0/ 3824-3835
Diffstat (limited to 'indra/newview/llviewercontrol.cpp')
-rw-r--r--indra/newview/llviewercontrol.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index b71291f834..35226a1632 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -511,13 +511,34 @@ bool toggle_show_snapshot_button(const LLSD& newvalue)
bool toggle_show_navigation_panel(const LLSD& newvalue)
{
- LLNavigationBar::getInstance()->showNavigationPanel(newvalue.asBoolean());
+ LLRect floater_view_rect = gFloaterView->getRect();
+ LLRect notify_view_rect = gNotifyBoxView->getRect();
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
+
+ //if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher,
+ //and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower.
+ int pm=newvalue.asBoolean()?-1:1;
+ floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
+ notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight());
+ gFloaterView->setRect(floater_view_rect);
+ floater_view_rect = gFloaterView->getRect();
+ navbar->showNavigationPanel(newvalue.asBoolean());
return true;
}
bool toggle_show_favorites_panel(const LLSD& newvalue)
{
- LLNavigationBar::getInstance()->showFavoritesPanel(newvalue.asBoolean());
+ LLRect floater_view_rect = gFloaterView->getRect();
+ LLRect notify_view_rect = gNotifyBoxView->getRect();
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
+
+ //if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher,
+ //and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower.
+ int pm=newvalue.asBoolean()?-1:1;
+ floater_view_rect.mTop += pm*navbar->getDefFavBarHeight();
+ notify_view_rect.mTop += pm*navbar->getDefFavBarHeight();
+ gFloaterView->setRect(floater_view_rect);
+ navbar->showFavoritesPanel(newvalue.asBoolean());
return true;
}