From 60ba000989347e92e78f9db7a966ea4e87cecc5b Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 9 Jul 2009 03:40:30 +0000 Subject: Fixed LLPanel visible and enabled settings. Set the side panel width to 280. Changed the code to use the initial width of the side tray instead of the max of the panels. --- indra/newview/llsidetray.cpp | 35 ++-------------------- .../skins/default/xui/en/panel_side_tray.xml | 3 +- 2 files changed, 5 insertions(+), 33 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 53b88ba430..f50f5a3db0 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -170,11 +170,6 @@ BOOL LLSideTrayTab::postBuild() return true; } -S32 LLSideTrayTab::getMaxSideBarTabWidth() -{ - return (mAccordionPanel)?mAccordionPanel->getMaxPanelWidth():0; -} - static const S32 splitter_margin = 1; //virtual @@ -251,10 +246,11 @@ LLSideTrayTab* LLSideTrayTab::createInstance () //virtual LLSideTray::LLSideTray(Params& params) - :mActiveTab(0) + : LLPanel(params) + ,mActiveTab(0) ,mCollapsed(false) ,mCollapseButton(0) - ,mMaxBarWidth(0) + ,mMaxBarWidth(params.rect.width) ,mHomeTab(0) { mCollapsed=params.collapsed; @@ -263,8 +259,6 @@ LLSideTray::LLSideTray(Params& params) BOOL LLSideTray::postBuild() { - calcMaxSideBarWidth(); - createButtons(); createHomeTab(); @@ -476,10 +470,6 @@ void LLSideTray::arrange () { static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams()); - calcMaxSideBarWidth(); - - - setPanelRect(); LLRect ctrl_rect; @@ -552,25 +542,6 @@ void LLSideTray::expandSideBar () } -void LLSideTray::calcMaxSideBarWidth() -{ - - S32 max_bar_width = 0; - - - child_vector_const_iter_t child_it; - for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it) - { - LLSideTrayTab* sidebar_tab = dynamic_cast(*child_it); - if(sidebar_tab == NULL) - continue; - max_bar_width = llmax(max_bar_width,sidebar_tab->getMaxSideBarTabWidth()); - } - - if(max_bar_width > 0) - mMaxBarWidth = max_bar_width; - -} void LLSideTray::highlightFocused() { if(!mActiveTab) diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml index 4f6f53e5b4..feba6a7d02 100644 --- a/indra/newview/skins/default/xui/en/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml @@ -4,7 +4,8 @@ background_visible="false" bg_opaque_color="0.0 0.0 0.0 0.0" mouse_opaque="true" - collapsed="true" + width="280" + collapsed="true" >