diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-08-28 22:30:09 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-08-28 22:30:09 +0000 |
commit | 51500f82e23b7deff9a0e1bc23f5bfa40aec1fb9 (patch) | |
tree | 2ed65f1dd0a8404eda670cf1fe2e37769758f74a /indra/newview/llsidetray.cpp | |
parent | b2b980d6979b10a08b56c10b71c12ae4f9e6ff59 (diff) |
svn merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1480 https://svn.aws.productengine.com/secondlife/pe/stable-2@1489 -> viewer-2.0.0-3
* EXT-97 EXT-576 EXT-593 EXT-613 EXT-649 EXT-697 EXT-707 EXT-708 EXT-726 EXT-737
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r-- | indra/newview/llsidetray.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 5e5608460c..3ac9076e85 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -40,6 +40,7 @@ #include "llaccordionctrl.h" #include "llfocusmgr.h" #include "llrootview.h" +#include "llnavigationbar.h" #include "llaccordionctrltab.h" @@ -642,10 +643,30 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para } static const S32 fake_offset = 132; -static const S32 fake_top_offset = 78; +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_height = parent_rect.getHeight()-fake_top_offset; + + reshape(panel_width,panel_height); +} void LLSideTray::setPanelRect () { + LLNavigationBar* nav_bar = LLNavigationBar::getInstance(); + LLRect nav_rect = nav_bar->getRect(); + static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>()); const LLRect& parent_rect = gViewerWindow->getRootView()->getRect(); @@ -654,9 +675,11 @@ void LLSideTray::setPanelRect () if(!mCollapsed) panel_width+=mMaxBarWidth; - S32 panel_height = parent_rect.getHeight() - fake_top_offset - LLBottomTray::getInstance()->getRect().getHeight(); + S32 panel_height = parent_rect.getHeight()-fake_top_offset - nav_rect.getHeight(); + S32 panel_top = parent_rect.mTop-fake_top_offset - nav_rect.getHeight(); + LLRect panel_rect; - panel_rect.setLeftTopAndSize( parent_rect.mRight-panel_width, parent_rect.mTop-fake_top_offset, panel_width, panel_height); + panel_rect.setLeftTopAndSize( parent_rect.mRight-panel_width, panel_top, panel_width, panel_height); setRect(panel_rect); } |