diff options
-rw-r--r-- | indra/llui/llpanel.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 35 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_side_tray.xml | 3 |
3 files changed, 9 insertions, 33 deletions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 2119ed4daf..de102e47ac 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -418,6 +418,10 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_ void LLPanel::initFromParams(const LLPanel::Params& p) { + // The LLPanel constructor doesn't correctly receive Params yet + setEnabled(p.enabled); + setVisible(p.visible); + // control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible LLUICtrl::initFromParams(p); 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<LLSideTray>()); - 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<LLSideTrayTab*>(*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" > <sidetray_tab name="sidebar_people" |