summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-07-09 03:40:30 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-07-09 03:40:30 +0000
commit60ba000989347e92e78f9db7a966ea4e87cecc5b (patch)
tree04acc7ebf5812a1fd6c7566f3a2fd100ef6fae8b
parent3df2f5e8c027b96f99b126fb8e6d687703e6bb4a (diff)
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.
-rw-r--r--indra/llui/llpanel.cpp4
-rw-r--r--indra/newview/llsidetray.cpp35
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray.xml3
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"