summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-28 22:58:17 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-28 22:58:17 +0000
commit0aa2bc4831674e61edf680887eba9acec9f997ed (patch)
treeedf19fd9b857cf13b9e7ad943b65178954b4811c /indra/newview/llsidetray.cpp
parent51500f82e23b7deff9a0e1bc23f5bfa40aec1fb9 (diff)
svn merge -r 1490-1500 https://svn.aws.productengine.com/secondlife/pe/stable-2
Bug Fixes: * EXT-637 EXT-595 Dev work: * EXT-694 QA: * Be sure feature works on other locales Known issues: * If old Calling Card of person who presents in the friend list is removed - "Do you want to remove ..." dialog is shown, if old Calling Card of non-friend is removed it is removed in the old way without any alerts. * It is possible to create 2 deep level subfolders under the Calling Cards/Friends/ subfolders. This should be disabled due to Accordion does not support tree hierarchy. * If friendship is removed when agent is offline, Friend Card is not removed from Inventory.
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r--indra/newview/llsidetray.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 3ac9076e85..afa8e5f072 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -642,20 +642,18 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
return NULL;
}
+// *TODO: Eliminate magic constants.
static const S32 fake_offset = 132;
static const S32 fake_top_offset = 18;
void LLSideTray::resetPanelRect ()
{
- LLNavigationBar* nav_bar = LLNavigationBar::getInstance();
- LLRect nav_rect = nav_bar->getRect();
const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
- S32 panel_width = sidetray_params.default_button_width+sidetray_params.default_button_margin;
- if(!mCollapsed)
- panel_width+=mMaxBarWidth;
+ S32 panel_width = sidetray_params.default_button_width;
+ panel_width += mCollapsed ? sidetray_params.default_button_margin : mMaxBarWidth;
S32 panel_height = parent_rect.getHeight()-fake_top_offset;
@@ -671,9 +669,8 @@ void LLSideTray::setPanelRect ()
const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
- S32 panel_width = sidetray_params.default_button_width+sidetray_params.default_button_margin;
- if(!mCollapsed)
- panel_width+=mMaxBarWidth;
+ S32 panel_width = sidetray_params.default_button_width;
+ panel_width += mCollapsed ? sidetray_params.default_button_margin : mMaxBarWidth;
S32 panel_height = parent_rect.getHeight()-fake_top_offset - nav_rect.getHeight();
S32 panel_top = parent_rect.mTop-fake_top_offset - nav_rect.getHeight();