diff options
49 files changed, 486 insertions, 603 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 2e6e4912bf..92c8416cbc 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -41,92 +41,56 @@  #include "llresizebar.h"  #include "llcriticaldamp.h" -static LLDefaultChildRegistry::Register<LLLayoutStack> register_layout_stack("layout_stack", &LLLayoutStack::fromXML); - +static LLDefaultChildRegistry::Register<LLLayoutStack> register_layout_stack("layout_stack"); +static LLLayoutStack::LayoutStackRegistry::Register<LLLayoutPanel> register_layout_panel("layout_panel");  // -// LLLayoutStack +// LLLayoutPanel  // -struct LLLayoutStack::LayoutPanel +LLLayoutPanel::LLLayoutPanel(const Params& p)	 +:	LLPanel(p), + 	mMinDim(p.min_dim),  + 	mMaxDim(p.max_dim),  + 	mAutoResize(p.auto_resize), + 	mUserResize(p.user_resize), + 	mCollapsed(FALSE), + 	mCollapseAmt(0.f), + 	mVisibleAmt(1.f), // default to fully visible + 	mResizeBar(NULL)   { -	LayoutPanel(LLPanel* panelp, ELayoutOrientation orientation, S32 min_width, S32 min_height, S32 max_width, S32 max_height, BOOL auto_resize, BOOL user_resize)	:	mPanel(panelp),  -		mMinWidth(min_width),  -		mMinHeight(min_height), -		mMaxWidth(max_width),  -		mMaxHeight(max_height), -		mAutoResize(auto_resize), -		mUserResize(user_resize), -		mOrientation(orientation), -		mCollapsed(FALSE), -		mCollapseAmt(0.f), -		mVisibleAmt(1.f), // default to fully visible -		mResizeBar(NULL)  +	// panels initialized as hidden should not start out partially visible +	if (!getVisible())  	{ -		LLResizeBar::Side side = (orientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; -		LLRect resize_bar_rect = panelp->getRect(); - -		S32 min_dim; -		if (orientation == HORIZONTAL) -		{ -			min_dim = mMinHeight; -		} -		else -		{ -			min_dim = mMinWidth; -		} -		LLResizeBar::Params p; -		p.name("resize"); -			p.resizing_view(mPanel); -		p.min_size(min_dim); -		p.side(side); -		p.snapping_enabled(false); -		mResizeBar = LLUICtrlFactory::create<LLResizeBar>(p); -		// panels initialized as hidden should not start out partially visible -		if (!mPanel->getVisible()) -		{ -			mVisibleAmt = 0.f; -		} +		mVisibleAmt = 0.f;  	} +} -	~LayoutPanel() -	{ -		// probably not necessary, but... -		delete mResizeBar; -		mResizeBar = NULL; -	} +LLLayoutPanel::~LLLayoutPanel() +{ +	// probably not necessary, but... +	delete mResizeBar; +	mResizeBar = NULL; +} -	F32 getCollapseFactor() +F32 LLLayoutPanel::getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation) +{ +	if (orientation == LLLayoutStack::HORIZONTAL)  	{ -		if (mOrientation == HORIZONTAL) -		{ -			F32 collapse_amt =  -				clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinWidth / (F32)llmax(1, mPanel->getRect().getWidth())); -			return mVisibleAmt * collapse_amt; -		} -		else +		F32 collapse_amt =  +			clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth())); +		return mVisibleAmt * collapse_amt; +	} +	else  	{ -			F32 collapse_amt =  -				clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinHeight / (F32)llmax(1, mPanel->getRect().getHeight()))); -			return mVisibleAmt * collapse_amt; -		} +		F32 collapse_amt =  +			clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinDim / (F32)llmax(1, getRect().getHeight()))); +		return mVisibleAmt * collapse_amt;  	} +} -	LLPanel* mPanel; -	S32 mMinWidth; -	S32 mMinHeight; - -	// mMaxWidth & mMaxHeight are added to make configurable max width of the nearby chat bar. EXT-5589 -	// they are not processed by LLLayoutStack but they can be if necessary -	S32 mMaxWidth; -	S32 mMaxHeight; -	BOOL mAutoResize; -	BOOL mUserResize; -	BOOL mCollapsed; -	LLResizeBar* mResizeBar; -	ELayoutOrientation mOrientation; -	F32 mVisibleAmt; -	F32 mCollapseAmt; -}; +// +// LLLayoutStack +//  LLLayoutStack::Params::Params()  :	orientation("orientation", std::string("vertical")), @@ -163,18 +127,18 @@ void LLLayoutStack::draw()  	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)  	{  		// clip to layout rectangle, not bounding rectangle -		LLRect clip_rect = (*panel_it)->mPanel->getRect(); +		LLRect clip_rect = (*panel_it)->getRect();  		// scale clipping rectangle by visible amount  		if (mOrientation == HORIZONTAL)  		{ -			clip_rect.mRight = clip_rect.mLeft + llround((F32)clip_rect.getWidth() * (*panel_it)->getCollapseFactor()); +			clip_rect.mRight = clip_rect.mLeft + llround((F32)clip_rect.getWidth() * (*panel_it)->getCollapseFactor(mOrientation));  		}  		else  		{ -			clip_rect.mBottom = clip_rect.mTop - llround((F32)clip_rect.getHeight() * (*panel_it)->getCollapseFactor()); +			clip_rect.mBottom = clip_rect.mTop - llround((F32)clip_rect.getHeight() * (*panel_it)->getCollapseFactor(mOrientation));  		} -		LLPanel* panelp = (*panel_it)->mPanel; +		LLPanel* panelp = (*panel_it);  		LLLocalClipRect clip(clip_rect, mClip);  		// only force drawing invisible children if visible amount is non-zero @@ -185,7 +149,7 @@ void LLLayoutStack::draw()  void LLLayoutStack::removeChild(LLView* view)  { -	LayoutPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast<LLPanel*>(view)); +	LLLayoutPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast<LLPanel*>(view));  	if (embedded_panelp)  	{ @@ -206,149 +170,16 @@ BOOL LLLayoutStack::postBuild()  	return TRUE;  } -static void get_attribute_s32_and_write(LLXMLNodePtr node, -										const char* name, -										S32 *value, -										S32 default_value, -										LLXMLNodePtr output_child) -{ -	BOOL has_attr = node->getAttributeS32(name, *value); -	if (has_attr && *value != default_value && output_child) -	{ -		// create an attribute child node -		LLXMLNodePtr child_attr = output_child->createChild(name, TRUE); -		child_attr->setIntValue(*value); -	} -} - -static void get_attribute_bool_and_write(LLXMLNodePtr node, -										const char* name, -										BOOL *value, -										BOOL default_value, -										LLXMLNodePtr output_child) +bool LLLayoutStack::addChild(LLView* child, S32 tab_group)  { -	BOOL has_attr = node->getAttributeBOOL(name, *value); -	if (has_attr && *value != default_value && output_child) +	LLLayoutPanel* panelp = dynamic_cast<LLLayoutPanel*>(child); +	if (panelp)  	{ -		LLXMLNodePtr child_attr = output_child->createChild(name, TRUE); -		child_attr->setBoolValue(*value); +		mPanels.push_back(panelp);  	} +	return LLView::addChild(child, tab_group);  } -//static  -LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node) -{ -	LLLayoutStack::Params p(LLUICtrlFactory::getDefaultParams<LLLayoutStack>()); -	LLXUIParser parser; -	parser.readXUI(node, p, LLUICtrlFactory::getInstance()->getCurFileName()); - -	// Export must happen before setupParams() mungles rectangles and before -	// this item gets added to parent (otherwise screws up last_child_rect -	// logic). JC -	if (output_node) -	{ -		Params output_params(p); -		setupParamsForExport(output_params, parent); -		LLLayoutStack::Params default_params(LLUICtrlFactory::getDefaultParams<LLLayoutStack>()); -		output_node->setName(node->getName()->mString); -		parser.writeXUI(output_node, output_params, &default_params); -	} - -	p.from_xui = true; -	applyXUILayout(p, parent); -	LLLayoutStack* layout_stackp = LLUICtrlFactory::create<LLLayoutStack>(p); - -	if (parent && layout_stackp) -	{ -		S32 tab_group = p.tab_group.isProvided() ? p.tab_group() : parent->getLastTabGroup(); - -		parent->addChild(layout_stackp, tab_group); -	} - -	for (LLXMLNodePtr child_node = node->getFirstChild(); child_node.notNull(); child_node = child_node->getNextSibling()) -	{ -		const S32 DEFAULT_MIN_WIDTH = 0; -		const S32 DEFAULT_MIN_HEIGHT = 0; -		const S32 DEFAULT_MAX_WIDTH = S32_MAX; -		const S32 DEFAULT_MAX_HEIGHT = S32_MAX; -		const BOOL DEFAULT_AUTO_RESIZE = TRUE; - -		S32 min_width = DEFAULT_MIN_WIDTH; -		S32 min_height = DEFAULT_MIN_HEIGHT; -		S32 max_width = DEFAULT_MAX_WIDTH; -		S32 max_height = DEFAULT_MAX_HEIGHT; -		BOOL auto_resize = DEFAULT_AUTO_RESIZE; - -		LLXMLNodePtr output_child; -		if (output_node)  -		{ -			output_child = output_node->createChild("", FALSE); -		} - -		// Layout stack allows child nodes to acquire additional attributes, -		// such as "min_width" in:  <button label="Foo" min_width="100"/> -		// If these attributes exist and have non-default values, write them -		// to the output node. -		get_attribute_s32_and_write(child_node, "min_width", &min_width, -			DEFAULT_MIN_WIDTH, output_child); -		get_attribute_s32_and_write(child_node, "min_height", &min_height, -			DEFAULT_MIN_HEIGHT, output_child); -		get_attribute_s32_and_write(child_node, "max_width", &max_width, -			DEFAULT_MAX_WIDTH, output_child); -		get_attribute_s32_and_write(child_node, "max_height", &max_height, -			DEFAULT_MAX_HEIGHT, output_child); -		get_attribute_bool_and_write(child_node, "auto_resize", &auto_resize, -			DEFAULT_AUTO_RESIZE, output_child); - -		if (child_node->hasName("layout_panel")) -		{ -			BOOL user_resize = TRUE; -			get_attribute_bool_and_write(child_node, "user_resize", &user_resize, -				TRUE, output_child); -			LLPanel* panelp = (LLPanel*)LLPanel::fromXML(child_node, layout_stackp, output_child); -			if (panelp) -			{ -				panelp->setFollowsNone(); -				layout_stackp->addPanel(panelp, min_width, min_height, max_width, max_height, auto_resize, user_resize); -			} -		} -		else -		{ -			BOOL user_resize = FALSE; -			get_attribute_bool_and_write(child_node, "user_resize", &user_resize, -				FALSE, output_child); - -			LLPanel::Params p; -			p.mouse_opaque(false); -			LLPanel* panelp = LLUICtrlFactory::create<LLPanel>(p); -			LLView* new_child = LLUICtrlFactory::getInstance()->createFromXML(child_node, panelp, LLStringUtil::null, LLPanel::child_registry_t::instance(), output_child); -			if (new_child) -			{ -				// put child in new embedded panel -				layout_stackp->addPanel(panelp, min_width, min_height, max_width, max_height, auto_resize, user_resize); -				// resize panel to contain widget and move widget to be contained in panel -				panelp->setRect(new_child->getRect()); -				new_child->setOrigin(0, 0); -			} -			else -			{ -				panelp->die(); -			} -		} -		 -		if (output_child && !output_child->mChildren && output_child->mAttributes.empty() && output_child->getValue().empty()) -		{ -			output_node->deleteChild(output_child); -		} -	} - -	if (!layout_stackp->postBuild()) -	{ -		delete layout_stackp; -		return NULL; -	} -	return layout_stackp; -}  S32 LLLayoutStack::getDefaultHeight(S32 cur_height)  { @@ -374,34 +205,14 @@ S32 LLLayoutStack::getDefaultWidth(S32 cur_width)  	return cur_width;  } -void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, S32 max_width, S32 max_height, BOOL auto_resize, BOOL user_resize, EAnimate animate, S32 index) +void LLLayoutStack::addPanel(LLLayoutPanel* panel, EAnimate animate)  { -	// panel starts off invisible (collapsed) -	if (animate == ANIMATE) -	{ -		panel->setVisible(FALSE); -	} -	LayoutPanel* embedded_panel = new LayoutPanel(panel, mOrientation, min_width, min_height, max_width, max_height, auto_resize, user_resize); -	 -	mPanels.insert(mPanels.begin() + llclamp(index, 0, (S32)mPanels.size()), embedded_panel); -	 -	if (panel->getParent() != this)  -	{ -		addChild(panel); -	} -	addChild(embedded_panel->mResizeBar); - -	// bring all resize bars to the front so that they are clickable even over the panels -	// with a bit of overlap -	for (e_panel_list_t::iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it) -	{ -		LLResizeBar* resize_barp = (*panel_it)->mResizeBar; -		sendChildToFront(resize_barp); -	} +	addChild(panel); -	// start expanding panel animation +	// panel starts off invisible (collapsed)  	if (animate == ANIMATE)  	{ +		panel->mVisibleAmt = 0.f;  		panel->setVisible(TRUE);  	}  } @@ -413,7 +224,7 @@ void LLLayoutStack::removePanel(LLPanel* panel)  void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)  { -	LayoutPanel* panel_container = findEmbeddedPanel(panel); +	LLLayoutPanel* panel_container = findEmbeddedPanel(panel);  	if (!panel_container) return;  	panel_container->mCollapsed = collapsed; @@ -421,7 +232,7 @@ void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)  void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize)  { -	LayoutPanel* panel = findEmbeddedPanelByName(panel_name); +	LLLayoutPanel* panel = findEmbeddedPanelByName(panel_name);  	if (panel)  	{ @@ -431,7 +242,7 @@ void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL au  void LLLayoutStack::setPanelUserResize(const std::string& panel_name, BOOL user_resize)  { -	LayoutPanel* panel = findEmbeddedPanelByName(panel_name); +	LLLayoutPanel* panel = findEmbeddedPanelByName(panel_name);  	if (panel)  	{ @@ -439,27 +250,25 @@ void LLLayoutStack::setPanelUserResize(const std::string& panel_name, BOOL user_  	}  } -bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp) +bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_dimp)  { -	LayoutPanel* panel = findEmbeddedPanelByName(panel_name); +	LLLayoutPanel* panel = findEmbeddedPanelByName(panel_name);  	if (panel)  	{ -		if (min_widthp) *min_widthp = panel->mMinWidth; -		if (min_heightp) *min_heightp = panel->mMinHeight; +		if (min_dimp) *min_dimp = panel->mMinDim;  	}  	return NULL != panel;  } -bool LLLayoutStack::getPanelMaxSize(const std::string& panel_name, S32* max_widthp, S32* max_heightp) +bool LLLayoutStack::getPanelMaxSize(const std::string& panel_name, S32* max_dimp)  { -	LayoutPanel* panel = findEmbeddedPanelByName(panel_name); +	LLLayoutPanel* panel = findEmbeddedPanelByName(panel_name);  	if (panel)  	{ -		if (max_widthp) *max_widthp = panel->mMaxWidth; -		if (max_heightp) *max_heightp = panel->mMaxHeight; +		if (max_dimp) *max_dimp = panel->mMaxDim;  	}  	return NULL != panel; @@ -471,6 +280,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  	LLFastTimer ft(FTM_UPDATE_LAYOUT);  	static LLUICachedControl<S32> resize_bar_overlap ("UIResizeBarOverlap", 0);  	calcMinExtents(); +	createResizeBars();  	// calculate current extents  	S32 total_width = 0; @@ -482,7 +292,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  	e_panel_list_t::iterator panel_it;  	for (panel_it = mPanels.begin(); panel_it != mPanels.end();	++panel_it)  	{ -		LLPanel* panelp = (*panel_it)->mPanel; +		LLPanel* panelp = (*panel_it);  		if (panelp->getVisible())   		{  			if (mAnimate) @@ -532,11 +342,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  		if (mOrientation == HORIZONTAL)  		{  			// enforce minimize size constraint by default -			if (panelp->getRect().getWidth() < (*panel_it)->mMinWidth) +			if (panelp->getRect().getWidth() < (*panel_it)->mMinDim)  			{ -				panelp->reshape((*panel_it)->mMinWidth, panelp->getRect().getHeight()); +				panelp->reshape((*panel_it)->mMinDim, panelp->getRect().getHeight());  			} -        	total_width += llround(panelp->getRect().getWidth() * (*panel_it)->getCollapseFactor()); +        	total_width += llround(panelp->getRect().getWidth() * (*panel_it)->getCollapseFactor(mOrientation));          	// want n-1 panel gaps for n panels  			if (panel_it != mPanels.begin())  			{ @@ -546,11 +356,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  		else //VERTICAL  		{  			// enforce minimize size constraint by default -			if (panelp->getRect().getHeight() < (*panel_it)->mMinHeight) +			if (panelp->getRect().getHeight() < (*panel_it)->mMinDim)  			{ -				panelp->reshape(panelp->getRect().getWidth(), (*panel_it)->mMinHeight); +				panelp->reshape(panelp->getRect().getWidth(), (*panel_it)->mMinDim);  			} -			total_height += llround(panelp->getRect().getHeight() * (*panel_it)->getCollapseFactor()); +			total_height += llround(panelp->getRect().getHeight() * (*panel_it)->getCollapseFactor(mOrientation));  			if (panel_it != mPanels.begin())  			{  				total_height += mPanelSpacing; @@ -564,7 +374,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)  	{  		// panels that are not fully visible do not count towards shrink headroom -		if ((*panel_it)->getCollapseFactor() < 1.f)  +		if ((*panel_it)->getCollapseFactor(mOrientation) < 1.f)   		{  			continue;  		} @@ -577,11 +387,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  		{  			if (mOrientation == HORIZONTAL)  			{ -				shrink_headroom_total += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth; +				shrink_headroom_total += (*panel_it)->getRect().getWidth() - (*panel_it)->mMinDim;  			}  			else //VERTICAL  			{ -				shrink_headroom_total += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight; +				shrink_headroom_total += (*panel_it)->getRect().getHeight() - (*panel_it)->mMinDim;  			}  		}  		else @@ -589,13 +399,13 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  			num_resizable_panels++;  			if (mOrientation == HORIZONTAL)  			{ -				shrink_headroom_available += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth; -				shrink_headroom_total += (*panel_it)->mPanel->getRect().getWidth() - (*panel_it)->mMinWidth; +				shrink_headroom_available += (*panel_it)->getRect().getWidth() - (*panel_it)->mMinDim; +				shrink_headroom_total += (*panel_it)->getRect().getWidth() - (*panel_it)->mMinDim;  			}  			else //VERTICAL  			{ -				shrink_headroom_available += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight; -				shrink_headroom_total += (*panel_it)->mPanel->getRect().getHeight() - (*panel_it)->mMinHeight; +				shrink_headroom_available += (*panel_it)->getRect().getHeight() - (*panel_it)->mMinDim; +				shrink_headroom_total += (*panel_it)->getRect().getHeight() - (*panel_it)->mMinDim;  			}  		}  	} @@ -618,17 +428,25 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)  	{ -		LLPanel* panelp = (*panel_it)->mPanel; +		LLPanel* panelp = (*panel_it);  		S32 cur_width = panelp->getRect().getWidth();  		S32 cur_height = panelp->getRect().getHeight(); -		S32 new_width = llmax((*panel_it)->mMinWidth, cur_width); -		S32 new_height = llmax((*panel_it)->mMinHeight, cur_height);  +		S32 new_width = cur_width; +		S32 new_height = cur_height;  +		if (mOrientation == HORIZONTAL) +		{ +			new_width = llmax((*panel_it)->mMinDim, new_width); +		} +		else +		{ +			new_height = llmax((*panel_it)->mMinDim, new_height); +		}  		S32 delta_size = 0;  		// if panel can automatically resize (not animating, and resize flag set)... -		if ((*panel_it)->getCollapseFactor() == 1.f  +		if ((*panel_it)->getCollapseFactor(mOrientation) == 1.f   			&& (force_resize || (*panel_it)->mAutoResize)   			&& !(*panel_it)->mResizeBar->hasMouseCapture())   		{ @@ -639,8 +457,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  				{  					// shrink proportionally to amount over minimum  					// so we can do this in one pass -					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - (*panel_it)->mMinWidth) / (F32)shrink_headroom_available)) : 0; -					shrink_headroom_available -= (cur_width - (*panel_it)->mMinWidth); +					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - (*panel_it)->mMinDim) / (F32)shrink_headroom_available)) : 0; +					shrink_headroom_available -= (cur_width - (*panel_it)->mMinDim);  				}  				else  				{ @@ -649,7 +467,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  					num_resizable_panels--;  				}  				pixels_to_distribute -= delta_size; -				new_width = llmax((*panel_it)->mMinWidth, cur_width + delta_size); +				new_width = llmax((*panel_it)->mMinDim, cur_width + delta_size);  			}  			else  			{ @@ -662,8 +480,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  				{  					// shrink proportionally to amount over minimum  					// so we can do this in one pass -					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - (*panel_it)->mMinHeight) / (F32)shrink_headroom_available)) : 0; -					shrink_headroom_available -= (cur_height - (*panel_it)->mMinHeight); +					delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - (*panel_it)->mMinDim) / (F32)shrink_headroom_available)) : 0; +					shrink_headroom_available -= (cur_height - (*panel_it)->mMinDim);  				}  				else  				{ @@ -671,7 +489,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  					num_resizable_panels--;  				}  				pixels_to_distribute -= delta_size; -				new_height = llmax((*panel_it)->mMinHeight, cur_height + delta_size); +				new_height = llmax((*panel_it)->mMinDim, cur_height + delta_size);  			}  			else  			{ @@ -712,11 +530,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  		if (mOrientation == HORIZONTAL)  		{ -			cur_x += llround(new_width * (*panel_it)->getCollapseFactor()) + mPanelSpacing; +			cur_x += llround(new_width * (*panel_it)->getCollapseFactor(mOrientation)) + mPanelSpacing;  		}  		else //VERTICAL  		{ -			cur_y -= llround(new_height * (*panel_it)->getCollapseFactor()) + mPanelSpacing; +			cur_y -= llround(new_height * (*panel_it)->getCollapseFactor(mOrientation)) + mPanelSpacing;  		}  	} @@ -724,19 +542,19 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  	LLResizeBar* last_resize_bar = NULL;  	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)  	{ -		LLPanel* panelp = (*panel_it)->mPanel; +		LLPanel* panelp = (*panel_it);  		if (mOrientation == HORIZONTAL)  		{  			(*panel_it)->mResizeBar->setResizeLimits( -				(*panel_it)->mMinWidth,  -				(*panel_it)->mMinWidth + shrink_headroom_total); +				(*panel_it)->mMinDim,  +				(*panel_it)->mMinDim + shrink_headroom_total);  		}  		else //VERTICAL  		{  			(*panel_it)->mResizeBar->setResizeLimits( -				(*panel_it)->mMinHeight,  -				(*panel_it)->mMinHeight + shrink_headroom_total); +				(*panel_it)->mMinDim,  +				(*panel_it)->mMinDim + shrink_headroom_total);  		}  		// toggle resize bars based on panel visibility, resizability, etc @@ -772,14 +590,14 @@ void LLLayoutStack::updateLayout(BOOL force_resize)  } // end LLLayoutStack::updateLayout -LLLayoutStack::LayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const +LLLayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) const  {  	if (!panelp) return NULL;  	e_panel_list_t::const_iterator panel_it;  	for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)  	{ -		if ((*panel_it)->mPanel == panelp) +		if ((*panel_it) == panelp)  		{  			return *panel_it;  		} @@ -787,15 +605,15 @@ LLLayoutStack::LayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) co  	return NULL;  } -LLLayoutStack::LayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) const +LLLayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) const  { -	LayoutPanel* result = NULL; +	LLLayoutPanel* result = NULL;  	for (e_panel_list_t::const_iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)  	{ -		LayoutPanel* p = *panel_it; +		LLLayoutPanel* p = *panel_it; -		if (p->mPanel->getName() == name) +		if (p->getName() == name)  		{  			result = p;  			break; @@ -816,9 +634,7 @@ void LLLayoutStack::calcMinExtents()  	{  		if (mOrientation == HORIZONTAL)  		{ -			mMinHeight = llmax(	mMinHeight,  -								(*panel_it)->mMinHeight); -            mMinWidth += (*panel_it)->mMinWidth; +            mMinWidth += (*panel_it)->mMinDim;  			if (panel_it != mPanels.begin())  			{  				mMinWidth += mPanelSpacing; @@ -826,9 +642,7 @@ void LLLayoutStack::calcMinExtents()  		}  		else //VERTICAL  		{ -	        mMinWidth = llmax(	mMinWidth,  -								(*panel_it)->mMinWidth); -			mMinHeight += (*panel_it)->mMinHeight; +			mMinHeight += (*panel_it)->mMinDim;  			if (panel_it != mPanels.begin())  			{  				mMinHeight += mPanelSpacing; @@ -837,6 +651,37 @@ void LLLayoutStack::calcMinExtents()  	}  } +void LLLayoutStack::createResizeBars() +{ +	for (e_panel_list_t::iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it) +	{ +		LLLayoutPanel* lp = (*panel_it); +		if (lp->mResizeBar == NULL) +		{ +			LLResizeBar::Side side = (mOrientation == HORIZONTAL) ? LLResizeBar::RIGHT : LLResizeBar::BOTTOM; +			LLRect resize_bar_rect = getRect(); + +			LLResizeBar::Params resize_params; +			resize_params.name("resize"); +			resize_params.resizing_view(this); +			resize_params.min_size(lp->mMinDim); +			resize_params.side(side); +			resize_params.snapping_enabled(false); +			LLResizeBar* resize_bar = LLUICtrlFactory::create<LLResizeBar>(resize_params); +			lp->mResizeBar = resize_bar; +			LLView::addChild(resize_bar, 0); + +			// bring all resize bars to the front so that they are clickable even over the panels +			// with a bit of overlap +			for (e_panel_list_t::iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it) +			{ +				LLResizeBar* resize_barp = (*panel_it)->mResizeBar; +				sendChildToFront(resize_barp); +			} +		} +	} +} +  // update layout stack animations, etc. once per frame  // NOTE: we use this to size world view based on animating UI, *before* we draw the UI  // we might still need to call updateLayout during UI draw phase, in case UI elements diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index e454454fe2..cc5bd6cf65 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -34,13 +34,18 @@  #ifndef LL_LLLAYOUTSTACK_H  #define LL_LLLAYOUTSTACK_H -#include "llview.h" +#include "llpanel.h"  class LLPanel; +class LLLayoutPanel; +  class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>  {  public: +	struct LayoutStackRegistry : public LLChildRegistry<LayoutStackRegistry> +	{}; +  	struct Params : public LLInitParam::Block<Params, LLView::Params>  	{  		Optional<std::string>	orientation; @@ -51,6 +56,8 @@ public:  		Params();  	}; +	typedef LayoutStackRegistry child_registry_t; +  	typedef enum e_layout_orientation  	{  		HORIZONTAL, @@ -62,6 +69,7 @@ public:  	/*virtual*/ void draw();  	/*virtual*/ void removeChild(LLView*);  	/*virtual*/ BOOL postBuild(); +	/*virtual*/ bool addChild(LLView* child, S32 tab_group = 0);  	static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL); @@ -74,7 +82,7 @@ public:  		ANIMATE  	} EAnimate; -	void addPanel(LLPanel* panel, S32 min_width, S32 min_height, S32 max_width, S32 max_height, BOOL auto_resize, BOOL user_resize, EAnimate animate = NO_ANIMATE, S32 index = S32_MAX); +	void addPanel(LLLayoutPanel* panel, EAnimate animate = NO_ANIMATE);  	void removePanel(LLPanel* panel);  	void collapsePanel(LLPanel* panel, BOOL collapsed = TRUE);  	S32 getNumPanels() { return mPanels.size(); } @@ -83,20 +91,18 @@ public:  	void setPanelUserResize(const std::string& panel_name, BOOL user_resize);  	/** -	 * Gets minimal width and/or height of the specified by name panel. +	 * Gets minimal dimension along layout_stack axis of the specified by name panel.  	 * -	 * If it is necessary to get only the one dimension pass NULL for another one.  	 * @returns true if specified by panel_name internal panel exists, false otherwise.  	 */ -	bool getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp); +	bool getPanelMinSize(const std::string& panel_name, S32* min_dimp);  	/** -	 * Gets maximal width and/or height of the specified by name panel. +	 * Gets maximal dimension along layout_stack axis of the specified by name panel.  	 * -	 * If it is necessary to get only the one dimension pass NULL for another one.  	 * @returns true if specified by panel_name internal panel exists, false otherwise.  	 */ -	bool getPanelMaxSize(const std::string& panel_name, S32* max_width, S32* max_height); +	bool getPanelMaxSize(const std::string& panel_name, S32* max_dim);  	void updateLayout(BOOL force_resize = FALSE); @@ -111,19 +117,18 @@ protected:  	friend class LLUICtrlFactory;  private: -	struct LayoutPanel; - +	void createResizeBars();  	void calcMinExtents();  	S32 getDefaultHeight(S32 cur_height);  	S32 getDefaultWidth(S32 cur_width);  	const ELayoutOrientation mOrientation; -	typedef std::vector<LayoutPanel*> e_panel_list_t; +	typedef std::vector<LLLayoutPanel*> e_panel_list_t;  	e_panel_list_t mPanels; -	LayoutPanel* findEmbeddedPanel(LLPanel* panelp) const; -	LayoutPanel* findEmbeddedPanelByName(const std::string& name) const; +	LLLayoutPanel* findEmbeddedPanel(LLPanel* panelp) const; +	LLLayoutPanel* findEmbeddedPanelByName(const std::string& name) const;  	S32 mMinWidth;  // calculated by calcMinExtents  	S32 mMinHeight;  // calculated by calcMinExtents @@ -135,4 +140,47 @@ private:  	bool mClip;  }; // end class LLLayoutStack +class LLLayoutPanel : public LLPanel +{ +friend LLLayoutStack; +friend class LLUICtrlFactory; +public: +	struct Params : public LLInitParam::Block<Params, LLPanel::Params> +	{ +		Optional<S32>			min_dim, +								max_dim; +		Optional<bool>			user_resize, +								auto_resize; + +		Params() +		:	min_dim("min_dim", 0), +			max_dim("max_dim", 0), +			user_resize("user_resize", true), +			auto_resize("auto_resize", true) +		{ +			addSynonym(min_dim, "min_width"); +			addSynonym(min_dim, "min_height"); +			addSynonym(max_dim, "max_width"); +			addSynonym(max_dim, "max_height"); +		} +	}; + +	~LLLayoutPanel(); +protected: +	LLLayoutPanel(const Params& p)	; + +	 +	F32 getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation); + +	S32 mMinDim; +	S32 mMaxDim; +	BOOL mAutoResize; +	BOOL mUserResize; +	BOOL mCollapsed; +	class LLResizeBar* mResizeBar; +	F32 mVisibleAmt; +	F32 mCollapseAmt; +}; + +  #endif diff --git a/indra/llui/llsdparam.cpp b/indra/llui/llsdparam.cpp index 338569fc58..69976004e6 100644 --- a/indra/llui/llsdparam.cpp +++ b/indra/llui/llsdparam.cpp @@ -50,25 +50,26 @@ LLParamSDParser::LLParamSDParser()  	if (sReadFuncs.empty())  	{ -		registerParserFuncs<S32>(readS32, bind(&LLParamSDParser::writeTypedValue<S32>, this, _1, _2)); -		registerParserFuncs<U32>(readU32, bind(&LLParamSDParser::writeU32Param, this, _1, _2)); -		registerParserFuncs<F32>(readF32, bind(&LLParamSDParser::writeTypedValue<F32>, this, _1, _2)); -		registerParserFuncs<F64>(readF64, bind(&LLParamSDParser::writeTypedValue<F64>, this, _1, _2)); -		registerParserFuncs<bool>(readBool, bind(&LLParamSDParser::writeTypedValue<F32>, this, _1, _2)); -		registerParserFuncs<std::string>(readString, bind(&LLParamSDParser::writeTypedValue<std::string>, this, _1, _2)); -		registerParserFuncs<LLUUID>(readUUID, bind(&LLParamSDParser::writeTypedValue<LLUUID>, this, _1, _2)); -		registerParserFuncs<LLDate>(readDate, bind(&LLParamSDParser::writeTypedValue<LLDate>, this, _1, _2)); -		registerParserFuncs<LLURI>(readURI, bind(&LLParamSDParser::writeTypedValue<LLURI>, this, _1, _2)); -		registerParserFuncs<LLSD>(readSD, bind(&LLParamSDParser::writeTypedValue<LLSD>, this, _1, _2)); +		registerParserFuncs<S32>(readS32, &LLParamSDParser::writeTypedValue<S32>); +		registerParserFuncs<U32>(readU32, &LLParamSDParser::writeU32Param); +		registerParserFuncs<F32>(readF32, &LLParamSDParser::writeTypedValue<F32>); +		registerParserFuncs<F64>(readF64, &LLParamSDParser::writeTypedValue<F64>); +		registerParserFuncs<bool>(readBool, &LLParamSDParser::writeTypedValue<F32>); +		registerParserFuncs<std::string>(readString, &LLParamSDParser::writeTypedValue<std::string>); +		registerParserFuncs<LLUUID>(readUUID, &LLParamSDParser::writeTypedValue<LLUUID>); +		registerParserFuncs<LLDate>(readDate, &LLParamSDParser::writeTypedValue<LLDate>); +		registerParserFuncs<LLURI>(readURI, &LLParamSDParser::writeTypedValue<LLURI>); +		registerParserFuncs<LLSD>(readSD, &LLParamSDParser::writeTypedValue<LLSD>);  	}  }  // special case handling of U32 due to ambiguous LLSD::assign overload -bool LLParamSDParser::writeU32Param(const void* val_ptr, const parser_t::name_stack_t& name_stack) +bool LLParamSDParser::writeU32Param(LLParamSDParser::parser_t& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)  { -	if (!mWriteSD) return false; +	LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser); +	if (!sdparser.mWriteSD) return false; -	LLSD* sd_to_write = getSDWriteNode(name_stack); +	LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);  	if (!sd_to_write) return false;  	sd_to_write->assign((S32)*((const U32*)val_ptr)); diff --git a/indra/llui/llsdparam.h b/indra/llui/llsdparam.h index e98318fc1e..83c958d67d 100644 --- a/indra/llui/llsdparam.h +++ b/indra/llui/llsdparam.h @@ -54,11 +54,12 @@ private:  	void readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block);  	template<typename T> -	bool writeTypedValue(const void* val_ptr, const parser_t::name_stack_t& name_stack) +	static bool writeTypedValue(Parser& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)  	{ -		if (!mWriteSD) return false; +		LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser); +		if (!sdparser.mWriteSD) return false; -		LLSD* sd_to_write = getSDWriteNode(name_stack); +		LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);  		if (!sd_to_write) return false;  		sd_to_write->assign(*((const T*)val_ptr)); @@ -67,7 +68,7 @@ private:  	LLSD* getSDWriteNode(const parser_t::name_stack_t& name_stack); -	bool writeU32Param(const void* value_ptr, const parser_t::name_stack_t& name_stack); +	static bool writeU32Param(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);  	static bool readS32(Parser& parser, void* val_ptr);  	static bool readU32(Parser& parser, void* val_ptr); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 48db873b6f..878def07ae 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -108,11 +108,7 @@ LLView::Params::Params()  	left_pad("left_pad"),  	left_delta("left_delta", S32_MAX),  	from_xui("from_xui", false), -	user_resize("user_resize"), -	auto_resize("auto_resize"),  	needs_translate("translate"), -	min_dim("min_width"), -	max_dim("max_width"),  	xmlns("xmlns"),  	xmlns_xsi("xmlns:xsi"),  	xsi_schemaLocation("xsi:schemaLocation"), @@ -120,8 +116,6 @@ LLView::Params::Params()  {  	addSynonym(rect, ""); -	addSynonym(min_dim, "min_height"); -	addSynonym(max_dim, "max_height");  }  LLView::LLView(const LLView::Params& p) diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 6736ad9f33..fa4f4c8ae2 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -145,18 +145,12 @@ public:  									left_delta;		// from last left to my left  		//FIXME: get parent context involved in parsing traversal -		Ignored						needs_translate;	// cue for translation tools +		Ignored						needs_translate,	// cue for translation tools  									xmlns,				// xml namespace  									xmlns_xsi,			// xml namespace  									xsi_schemaLocation,	// xml schema  									xsi_type;			// xml schema type -		// nested attributes for LLLayoutPanel -		Optional<S32>				min_dim, -									max_dim; -		Optional<bool>				user_resize,		 -									auto_resize; -  		Params();  	}; diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 99191d2dbe..922a91b609 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -74,7 +74,6 @@ namespace LLInitParam  	void BlockDescriptor::aggregateBlockData(BlockDescriptor& src_block_data)   	{  		mNamedParams.insert(src_block_data.mNamedParams.begin(), src_block_data.mNamedParams.end()); -		mSynonyms.insert(src_block_data.mSynonyms.begin(), src_block_data.mSynonyms.end());  		std::copy(src_block_data.mUnnamedParams.begin(), src_block_data.mUnnamedParams.end(), std::back_inserter(mUnnamedParams));  		std::copy(src_block_data.mValidationList.begin(), src_block_data.mValidationList.end(), std::back_inserter(mValidationList));  		std::copy(src_block_data.mAllParams.begin(), src_block_data.mAllParams.end(), std::back_inserter(mAllParams)); @@ -277,22 +276,6 @@ namespace LLInitParam  			}  		} -		for(BlockDescriptor::param_map_t::const_iterator it = block_data.mSynonyms.begin(); -			it != block_data.mSynonyms.end(); -			++it) -		{ -			param_handle_t param_handle = it->second->mParamHandle; -			const Param* param = getParamFromHandle(param_handle); -			ParamDescriptor::inspect_func_t inspect_func = it->second->mInspectFunc; -			if (inspect_func) -			{ -				// use existing serial number for param -				name_stack.push_back(std::make_pair(it->first, it->second->mGeneration)); -				inspect_func(*param, parser, name_stack, it->second->mMinCount, it->second->mMaxCount); -				name_stack.pop_back(); -			} -		} -  		return true;  	} @@ -314,22 +297,9 @@ namespace LLInitParam  				// find pointer to member parameter from offset table  				paramp = getParamFromHandle(found_it->second->mParamHandle);  				deserialize_func = found_it->second->mDeserializeFunc; -			} -			else -			{ -				BlockDescriptor::param_map_t::iterator found_it = block_data.mSynonyms.find(top_name); -				if (found_it != block_data.mSynonyms.end()) -				{ -					// find pointer to member parameter from offset table -					paramp = getParamFromHandle(found_it->second->mParamHandle); -					deserialize_func = found_it->second->mDeserializeFunc; -				} -			} -			Parser::name_stack_range_t new_name_stack(name_stack.first, name_stack.second); -			++new_name_stack.first; -			if (deserialize_func) -			{ +				Parser::name_stack_range_t new_name_stack(name_stack.first, name_stack.second); +				++new_name_stack.first;  				return deserialize_func(*paramp, p, new_name_stack, name_stack.first == name_stack.second ? -1 : name_stack.first->second);  			}  		} @@ -404,7 +374,7 @@ namespace LLInitParam  				}  				else  				{ -					block_data.mSynonyms[synonym] = param_descriptor; +					block_data.mNamedParams[synonym] = param_descriptor;  				}  			}  		} @@ -429,14 +399,6 @@ namespace LLInitParam  			}  		} -		for (BlockDescriptor::param_map_t::const_iterator it = block_data.mSynonyms.begin(); it != block_data.mSynonyms.end(); ++it) -		{ -			if (it->second->mParamHandle == handle) -			{ -				return it->first; -			} -		} -  		return LLStringUtil::null;  	} diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 488e20cf9f..51dbd99fb1 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -213,7 +213,10 @@ namespace LLInitParam  		Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)  		:	mParseSilently(false), -			mParseGeneration(0) +			mParseGeneration(0), +			mParserReadFuncs(&read_map), +			mParserWriteFuncs(&write_map), +			mParserInspectFuncs(&inspect_map)  		{}  		virtual ~Parser(); @@ -393,7 +396,6 @@ namespace LLInitParam  		typedef std::vector<std::pair<param_handle_t, ParamDescriptor::validation_func_t> > param_validation_list_t;  		param_map_t						mNamedParams;			// parameters with associated names -		param_map_t						mSynonyms;				// parameters with alternate names  		param_list_t					mUnnamedParams;			// parameters with_out_ associated names  		param_validation_list_t			mValidationList;		// parameters that must be validated  		all_params_list_t				mAllParams;				// all parameters, owns descriptors diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp index 220171fb79..9bda96713e 100644 --- a/indra/llxuixml/llxuiparser.cpp +++ b/indra/llxuixml/llxuiparser.cpp @@ -411,6 +411,7 @@ void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, cons  {  	LLFastTimer timer(FTM_PARSE_XUI);  	mNameStack.clear(); +	mRootNodeName = node->getName()->mString;  	mCurFileName = filename;  	mCurReadDepth = 0;  	setParseSilently(silent); @@ -421,11 +422,11 @@ void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, cons  	}  	else  	{ -		readXUIImpl(node, std::string(node->getName()->mString), block); +		readXUIImpl(node, block);  	}  } -bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, const std::string& scope, LLInitParam::BaseBlock& block) +bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)  {  	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;  	boost::char_separator<char> sep("."); @@ -492,7 +493,15 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, const std::string& scope, LLIn  			}  			// check for proper nesting -			if(!scope.empty() && *name_token_it != scope) +			if (mNameStack.empty()) +			{ +				if (*name_token_it != mRootNodeName) +				{ +					childp = childp->getNextSibling(); +					continue; +				} +			} +			else if(mNameStack.back().first != *name_token_it)  			{  				childp = childp->getNextSibling();  				continue; @@ -510,7 +519,7 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, const std::string& scope, LLIn  		}  		// recurse and visit children XML nodes -		if(readXUIImpl(childp, mNameStack.empty() ? scope : mNameStack.back().first, block)) +		if(readXUIImpl(childp, block))  		{  			// child node successfully parsed, remove from DOM diff --git a/indra/llxuixml/llxuiparser.h b/indra/llxuixml/llxuiparser.h index ee8fcdc369..1a4a7c49d1 100644 --- a/indra/llxuixml/llxuiparser.h +++ b/indra/llxuixml/llxuiparser.h @@ -118,7 +118,7 @@ public:  	void writeXUI(LLXMLNodePtr node, const LLInitParam::BaseBlock& block, const LLInitParam::BaseBlock* diff_block = NULL);  private: -	bool readXUIImpl(LLXMLNodePtr node, const std::string& scope, LLInitParam::BaseBlock& block); +	bool readXUIImpl(LLXMLNodePtr node, LLInitParam::BaseBlock& block);  	bool readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block);  	//reader helper functions @@ -167,6 +167,7 @@ private:  	LLXMLNodePtr					mLastWrittenChild;  	S32								mCurReadDepth;  	std::string						mCurFileName; +	std::string						mRootNodeName;  };  // LLSimpleXUIParser is a streamlined SAX-based XUI parser that does not support localization  diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index c4eda5f107..4377640416 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -76,7 +76,7 @@ namespace  		llassert(stack);  		if ( stack && panel && panel->getVisible() )  		{ -			stack->getPanelMinSize(panel->getName(), &minimal_width, NULL); +			stack->getPanelMinSize(panel->getName(), &minimal_width);  		}  		return minimal_width;  	} @@ -87,7 +87,7 @@ namespace  		llassert(stack);  		if ( stack && panel && panel->getVisible() )  		{ -			stack->getPanelMaxSize(panel->getName(), &max_width, NULL); +			stack->getPanelMaxSize(panel->getName(), &max_width);  		}  		return max_width;  	} @@ -975,7 +975,7 @@ void LLBottomTray::processShrinkButtons(S32& required_width, S32& buttons_freed_  		S32 panel_min_width = 0;  		std::string panel_name = mSpeakPanel->getName(); -		bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width, NULL); +		bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width);  		if (!success)  		{  			lldebugs << "Panel was not found to get its min width: " << panel_name << llendl; @@ -1021,7 +1021,7 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32&  		S32 panel_width = panel->getRect().getWidth();  		S32 panel_min_width = 0;  		std::string panel_name = panel->getName(); -		bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width, NULL); +		bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width);  		S32 possible_shrink_width = panel_width - panel_min_width;  		if (!success) @@ -1330,7 +1330,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible  			// Minimal width of current panel  			S32 minimal_width = 0; -			mToolbarStack->getPanelMinSize(cur_panel->getName(), &minimal_width, NULL); +			mToolbarStack->getPanelMinSize(cur_panel->getName(), &minimal_width);  			if ( (available_width + possible_shrunk_width) >= minimal_width)  			{ diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index e1e425fa8c..162b12cd5e 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -502,12 +502,17 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)  	const S32 NEW_TEXT_NOTICE_HEIGHT = 20; -	LLPanel::Params panel_p; +	LLLayoutPanel::Params panel_p;  	panel_p.name = "spacer";  	panel_p.background_visible = false;  	panel_p.has_border = false;  	panel_p.mouse_opaque = false; -	stackp->addPanel(LLUICtrlFactory::create<LLPanel>(panel_p), 0, 30, S32_MAX, S32_MAX, true, false, LLLayoutStack::ANIMATE); +	panel_p.min_dim = 30; +	panel_p.max_dim = S32_MAX; +	panel_p.auto_resize = true; +	panel_p.user_resize = false; + +	stackp->addPanel(LLUICtrlFactory::create<LLLayoutPanel>(panel_p), LLLayoutStack::ANIMATE);  	panel_p.name = "new_text_notice_holder";  	LLRect new_text_notice_rect = getLocalRect(); @@ -516,7 +521,10 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)  	panel_p.background_opaque = true;  	panel_p.background_visible = true;  	panel_p.visible = false; -	mMoreChatPanel = LLUICtrlFactory::create<LLPanel>(panel_p); +	panel_p.min_dim = 0; +	panel_p.auto_resize = false; +	panel_p.user_resize = false; +	mMoreChatPanel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);  	LLTextBox::Params text_p(p.more_chat_text);  	text_p.rect = mMoreChatPanel->getLocalRect(); @@ -525,7 +533,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)  	mMoreChatText = LLUICtrlFactory::create<LLTextBox>(text_p, mMoreChatPanel);  	mMoreChatText->setClickedCallback(boost::bind(&LLChatHistory::onClickMoreText, this)); -	stackp->addPanel(mMoreChatPanel, 0, 0, S32_MAX, S32_MAX, false, false, LLLayoutStack::ANIMATE); +	stackp->addPanel(mMoreChatPanel, LLLayoutStack::ANIMATE);  } diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index fa1f2e04a4..ddc456a5d2 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -144,7 +144,7 @@ class LLChatHistory : public LLUICtrl  		S32 mTopHeaderPad;  		S32 mBottomHeaderPad; -		LLPanel*		mMoreChatPanel; +		class LLLayoutPanel*	mMoreChatPanel;  		LLTextBox*		mMoreChatText;  		LLTextEditor*	mEditor;  		typedef std::set<std::string> unread_chat_source_t; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 18a6ac031f..751d5b8fcd 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -667,9 +667,10 @@ const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()  	{  		LLXMLNodePtr button_xml_node;  		if(LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", button_xml_node)) -	{ -			LLXUIParser::instance().readXUI(button_xml_node, button_params, "favorites_bar_button.xml"); -	} +		{ +			LLXUIParser parser; +			parser.readXUI(button_xml_node, button_params, "favorites_bar_button.xml"); +		}  		params_initialized = true;  	} diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 3d37c878ad..0a4d5b64f3 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -43,10 +43,10 @@  const S32 NOTIFICATION_PANEL_HEADER_HEIGHT = 20;  const S32 HEADER_PADDING = 38; -class LLNotificationChannelPanel : public LLPanel +class LLNotificationChannelPanel : public LLLayoutPanel  {  public: -	LLNotificationChannelPanel(const std::string& channel_name); +	LLNotificationChannelPanel(const Params& p);  	BOOL postBuild();  private: @@ -58,12 +58,12 @@ private:  	LLNotificationChannelPtr mChannelRejectsPtr;  }; -LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channel_name)  -	: LLPanel() +LLNotificationChannelPanel::LLNotificationChannelPanel(const LLNotificationChannelPanel::Params& p)  +:	LLLayoutPanel(p)  { -	mChannelPtr = LLNotifications::instance().getChannel(channel_name); +	mChannelPtr = LLNotifications::instance().getChannel(p.name);  	mChannelRejectsPtr = LLNotificationChannelPtr( -		LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(), +		LLNotificationChannel::buildChannel(p.name() + "rejects", mChannelPtr->getParentChannelName(),  											!boost::bind(mChannelPtr->getFilter(), _1)));  	buildFromFile( "panel_notifications_channel.xml");  } @@ -207,8 +207,13 @@ BOOL LLFloaterNotificationConsole::postBuild()  void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open)  {  	LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels"); -	LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(name); -	stack.addPanel(panelp, 0, NOTIFICATION_PANEL_HEADER_HEIGHT, S32_MAX, S32_MAX, TRUE, TRUE, LLLayoutStack::ANIMATE); +	LLNotificationChannelPanel::Params p; +	p.min_dim = NOTIFICATION_PANEL_HEADER_HEIGHT; +	p.auto_resize = true; +	p.user_resize = true; +	p.name = name; +	LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(p); +	stack.addPanel(panelp, LLLayoutStack::ANIMATE);  	LLButton& header_button = panelp->getChildRef<LLButton>("header");  	header_button.setToggleState(!open); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 41a19a54a8..fa3a627736 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -398,8 +398,7 @@ LLCtrlListInterface* LLGestureComboList::getListInterface()  }  LLNearbyChatBar::LLNearbyChatBar()  -	: LLPanel() -	, mChatBox(NULL) +:	mChatBox(NULL)  {  	mSpeakerMgr = LLLocalSpeakerMgr::getInstance();  } diff --git a/indra/newview/skins/default/xui/da/floater_voice_controls.xml b/indra/newview/skins/default/xui/da/floater_voice_controls.xml index 2e59dfd649..4c956f13a7 100644 --- a/indra/newview/skins/default/xui/da/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/da/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="Min avatar:"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="Forlad opkald" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +			<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="Forlad opkald" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +		</layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/da/panel_notes.xml b/indra/newview/skins/default/xui/da/panel_notes.xml index 5b3a2d0906..00128497ba 100644 --- a/indra/newview/skins/default/xui/da/panel_notes.xml +++ b/indra/newview/skins/default/xui/da/panel_notes.xml @@ -1,7 +1,7 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel label="Noter & Privatliv" name="panel_notes">  	<layout_stack name="layout"> -		<panel name="notes_stack"> +		<layout_panel name="notes_stack">  			<scroll_container name="profile_scroll">  				<panel name="profile_scroll_panel">  					<text name="status_message" value="Min private noter:"/> @@ -11,13 +11,13 @@  					<check_box label="Editére, slette og tage mine objekter" name="objects_check"/>  				</panel>  			</scroll_container> -		</panel> -		<panel name="notes_buttons_panel"> +		</layout_panel> +		<layout_panel name="notes_buttons_panel">  			<button label="Tilføj ven" name="add_friend" tool_tip="Tilbyd venskab til beboer"/>  			<button label="IM" name="im" tool_tip="Åben session med personlig besked (IM)"/>  			<button label="Kald" name="call" tool_tip="Opkald til denne beboer"/>  			<button label="Kort" name="show_on_map_btn" tool_tip="Vis beboer på kort"/>  			<button label="Teleport" name="teleport" tool_tip="Tilbyd teleport"/> -		</panel> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml index d3b3c7e21e..cfb32500c6 100644 --- a/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/da/panel_prim_media_controls.xml @@ -13,9 +13,9 @@  		50  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="Medie hentes"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/de/floater_voice_controls.xml b/indra/newview/skins/default/xui/de/floater_voice_controls.xml index 07b7689cd0..22f2fd93ab 100644 --- a/indra/newview/skins/default/xui/de/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/de/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="Mein Avatar:"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="Anruf beenden" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +			<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="Anruf beenden" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +		</layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/de/panel_notifications_channel.xml b/indra/newview/skins/default/xui/de/panel_notifications_channel.xml index e2166f7baf..35bd76ce70 100644 --- a/indra/newview/skins/default/xui/de/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/de/panel_notifications_channel.xml @@ -1,15 +1,19 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel name="notifications_panel">  	<layout_stack name="stack1"> -		<scroll_list name="notifications_list"> -			<column label="Name" name="name"/> -			<column label="Inhalt" name="content"/> -			<column label="Datum" name="date"/> -		</scroll_list> -		<scroll_list name="notification_rejects_list"> -			<column label="Name" name="name"/> -			<column label="Inhalt" name="content"/> -			<column label="Datum" name="date"/> -		</scroll_list> +	     <layout_panel name="notifications_list_panel" > +			<scroll_list name="notifications_list"> +				<column label="Name" name="name"/> +				<column label="Inhalt" name="content"/> +				<column label="Datum" name="date"/> +			</scroll_list> +		</layout_panel> +	     <layout_panel name="rejects_list_panel" > +			<scroll_list name="notification_rejects_list"> +				<column label="Name" name="name"/> +				<column label="Inhalt" name="content"/> +				<column label="Datum" name="date"/> +			</scroll_list> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml index 0a19483f8b..c85f2762b1 100644 --- a/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/de/panel_prim_media_controls.xml @@ -7,9 +7,9 @@  		0.2  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="Medien werden geladen"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index bf5bd87ad6..a46604c834 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -86,6 +86,7 @@               visible="true"               width="20" />          </layout_panel> +        <layout_panel name="leave_call_panel">          <layout_stack           clip="true"           auto_resize="false" @@ -96,7 +97,7 @@           name="voice_effect_and_leave_call_stack"           orientation="horizontal"           width="262"> -          <panel +          <layout_panel             class="panel_voice_effect"             name="panel_voice_effect"             visiblity_control="VoiceMorphingEnabled" @@ -118,6 +119,7 @@               width="100" />            </layout_panel>          </layout_stack> +          </layout_panel>        <layout_panel            follows="all"            layout="topleft" diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 01ee8264e6..c3bbe70609 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -20,6 +20,7 @@                    mouse_opaque="false"                    name="nav_bar_container"                    tab_stop="false" +                  min_height="10"                     width="1024"                    user_resize="false"                     visible="false"> @@ -65,25 +66,24 @@                          mouse_opaque="false"                          name="world_stack"                          orientation="vertical"> -            <panel auto_resize="true" -                   follows="all" -                   height="500" -                   layout="topleft" -                   tab_stop="false" -                   mouse_opaque="false" -                name="hud container" -                   width="500"> -            <panel auto_resize="false" -                   follows="left|top" -                   height="19" -                   left="0" -                   mouse_opaque="false" -                   name="topinfo_bar_container" -                   tab_stop="false" -                   top="0" -                   user_resize="false" -                   visible="false" -                   width="1024"/> +            <layout_panel auto_resize="true" +                          follows="all" +                          height="500" +                          layout="topleft" +                          tab_stop="false" +                          mouse_opaque="false" +                          user_resize="false"  +                          name="hud container" +                          width="500"> +              <panel follows="left|top" +                     height="19" +                     left="0" +                     mouse_opaque="false" +                     name="topinfo_bar_container" +                     tab_stop="false" +                     top="0" +                     visible="false" +                     width="1024"/>                <panel follows="right|top|bottom"                       height="500"                       mouse_opaque="false" @@ -101,7 +101,7 @@                       name="stand_stop_flying_container"                       visible="false"                       width="500"/> -            </panel> +            </layout_panel>              <layout_panel auto_resize="false"                     follows="all"                     min_height="33" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 4b622691b3..73225ef7d0 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -29,31 +29,32 @@       orientation="horizontal"       top="0"       width="1310"> -        <icon +        <layout_panel           auto_resize="false" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" -         left="0" +         user_resize="false"            min_width="2" -         top="0"           width="2" />          <layout_panel           auto_resize="false" -         filename="panel_nearby_chat_bar.xml" -         follows="left|right" -         height="28"           layout="topleft" -         left="0"           max_width="320"           min_height="23"           min_width="214"           mouse_opaque="false" -         name="chat_bar" -         top="4" +		 name="chat_bar_layout_panel"           user_resize="true" -         width="308" /> +         width="308" > +          <panel +            name="chat_bar" +            filename="panel_nearby_chat_bar.xml" +            left="0" +            height="28" +            width="308" +            top="4" +            mouse_opaque="false" +            follows="left|right" +          /> +        </layout_panel>          <!--          There is resize bar between chatbar and Speak button. It has 2px width (is is set as 2*UIResizeBarOverlap)          --> @@ -400,18 +401,10 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.                   width="7" />              </chiclet_panel>          </layout_panel> -        <icon -         auto_resize="false" -         color="0 0 0 0" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" -         left="0" -         min_width="4" -         name="DUMMY" -         top="0" -         width="4" /> +        <layout_panel auto_resize="false" +                      user_resize="false"  +                      width="4" +                      min_width="4"/>          <layout_panel           auto_resize="false"           follows="right" @@ -503,17 +496,11 @@ image_pressed_selected  "Lit" + "Selected" - there are new messages and the Well                  </button>              </chiclet_notification>          </layout_panel> -      <icon +      <layout_panel           auto_resize="false" -         color="0 0 0 0" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" -         left="0" +         user_resize="false"            min_width="4"           name="DUMMY2" -         top="0"           width="8" />      </layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml index 6e9476f814..0734ca9a4b 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml @@ -28,30 +28,29 @@       orientation="horizontal"       top="0"       width="1000"> -        <icon +        <layout_panel           auto_resize="false" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" +         user_resize="false"            min_width="2" -         left="0" -         top="0"           width="2" />          <layout_panel           mouse_opaque="false"           auto_resize="true" -         follows="left|right"           height="28"           layout="topleft" -         left="0"           min_height="23"           width="310" -         top="4"           min_width="188" -         name="chat_bar" -         user_resize="false" -         filename="panel_nearby_chat_bar.xml" /> +         user_resize="false"> +          <panel +            left="0" +            filename="panel_nearby_chat_bar.xml" +            follows="left|right" +            top="4" +            width="310" +            name="chat_bar" +            mouse_opaque="false"/> +        </layout_panel>          <layout_panel           mouse_opaque="false"           auto_resize="false" @@ -79,17 +78,11 @@                   use_ellipses="true" />              </gesture_combo_list>          </layout_panel> -        <icon +        <layout_panel           auto_resize="false" -         color="0 0 0 0" -         follows="left|right" -         height="10" -         image_name="spacer24.tga" -         layout="topleft" -         left="0" +         user_resize="false"            min_width="3"           name="after_gesture_panel" -         top="0"           width="3"/>      </layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml index 3143b0a40c..c3dc588ba2 100644 --- a/indra/newview/skins/default/xui/en/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/en/panel_notifications_channel.xml @@ -14,6 +14,9 @@       orientation="horizontal"       top="20"       width="100"> +      <layout_panel name="notifications_list_panel"  +                    width="100" +                    user_resize="true">          <scroll_list           draw_heading="true"           follows="left|right|top|bottom" @@ -24,7 +27,6 @@           sort_ascending="false"           sort_column="2"           top="0" -         user_resize="true"           width="100">              <scroll_list.columns               label="Name" @@ -39,6 +41,10 @@               name="date"               width="150" />          </scroll_list> +      </layout_panel> +      <layout_panel name="rejects_list_panel" +                    width="100" +                    user_resize="true">          <scroll_list           draw_heading="true"           follows="left|right|top|bottom" @@ -49,7 +55,6 @@           sort_ascending="false"           sort_column="2"           top="0" -         user_resize="true"           width="100">              <scroll_list.columns               label="Name" @@ -64,6 +69,7 @@               name="date"               width="150" />          </scroll_list> +      </layout_panel>      </layout_stack>      <button       follows="left|right|top" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 113d5fb6dc..7ae717d0e3 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -291,7 +291,7 @@        control_name="RenderReflectionDetail"        height="23"        layout="topleft" -      left_="10" +      left_delta="10"        top_pad ="0"        name="Reflections"        width="150"> diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 6bf00373ea..edf4b52773 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -33,7 +33,7 @@  		mouse_opaque="false"  		layout="topleft"  		user_resize="false" /> -	<panel +	<layout_panel  		name="media_progress_indicator"  		mouse_opaque="false"  		follows="left|right|top" @@ -55,7 +55,7 @@  		  top="0"  		  left="0"  		  tool_tip="Media is Loading"/> -	</panel> +	</layout_panel>  	<layout_panel  		name="right_bookend_bottom"  		width="0" diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml index 48bc021e6d..830ea12e41 100644 --- a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml +++ b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml @@ -8,18 +8,18 @@              thickness="15">    <up_button image_unselected="ScrollArrow_Up"               image_selected="ScrollArrow_Up" -             scale_image="true" thickness="15" +             scale_image="true"               hover_glow_amount="0.35"/>    <down_button image_unselected="ScrollArrow_Down"                 image_selected="ScrollArrow_Down" -               scale_image="true" thickness="15" +               scale_image="true"                 hover_glow_amount="0.35"/>    <left_button image_unselected="ScrollArrow_Left"                 image_selected="ScrollArrow_Left" -               scale_image="true" thickness="15" +               scale_image="true"                 hover_glow_amount="0.35"/>    <right_button image_unselected="ScrollArrow_Right"                 image_selected="ScrollArrow_Right" -               scale_image="true" thickness="15" +               scale_image="true"                 hover_glow_amount="0.35"/>  </scroll_bar> diff --git a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml index 3878c7a144..a120b1aec8 100644 --- a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml @@ -23,7 +23,4 @@    bg_writeable_color="TextBgWriteableColor"    bg_selected_color="EmphasisColor"    bg_focus_color="TextBgFocusColor"> -  <simple_text_editor.border -    bevel_style="in" -    follows="all" />  </simple_text_editor> diff --git a/indra/newview/skins/default/xui/es/floater_voice_controls.xml b/indra/newview/skins/default/xui/es/floater_voice_controls.xml index 51adeb4dff..6f4782417d 100644 --- a/indra/newview/skins/default/xui/es/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/es/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="Mi avatar:"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="Colgar" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +			<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="Colgar" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +		</layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/es/panel_notes.xml b/indra/newview/skins/default/xui/es/panel_notes.xml index 8de2afa767..da98e1b15e 100644 --- a/indra/newview/skins/default/xui/es/panel_notes.xml +++ b/indra/newview/skins/default/xui/es/panel_notes.xml @@ -1,7 +1,7 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel label="Notas y Privacidad" name="panel_notes">  	<layout_stack name="layout"> -		<panel name="notes_stack"> +		<layout_panel name="notes_stack">  			<scroll_container name="profile_scroll">  				<panel name="profile_scroll_panel">  					<text name="status_message" value="Mis notas privadas:"/> @@ -11,13 +11,13 @@  					<check_box label="Edite, borre o coja mis objetos" name="objects_check"/>  				</panel>  			</scroll_container> -		</panel> -		<panel name="notes_buttons_panel"> +		</layout_panel> +		<layout_panel name="notes_buttons_panel">  			<button label="Añadir como amigo" name="add_friend" tool_tip="Ofrecer amistad a este Residente"/>  			<button label="MI" name="im" tool_tip="Abrir un mensaje instantáneo"/>  			<button label="Llamar" name="call" tool_tip="Llamar a este Residente"/>  			<button label="Mapa" name="show_on_map_btn" tool_tip="Mostrar al Residente en el mapa"/>  			<button label="Teleportar" name="teleport" tool_tip="Ofrecer teleporte"/> -		</panel> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml index 174922e28e..90b9e475e7 100644 --- a/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/es/panel_prim_media_controls.xml @@ -13,9 +13,9 @@  		50  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="Los media se están cargando"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/fr/floater_voice_controls.xml b/indra/newview/skins/default/xui/fr/floater_voice_controls.xml index 5c26527ed6..8397dc4263 100644 --- a/indra/newview/skins/default/xui/fr/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/fr/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="Mon avatar :"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="Quitter l'appel" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +			<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="Quitter l'appel" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +		</layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml b/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml index 5beb71981c..110e017050 100644 --- a/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/fr/panel_notifications_channel.xml @@ -1,15 +1,19 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel name="notifications_panel">  	<layout_stack name="stack1"> -		<scroll_list name="notifications_list"> -			<column label="Nom" name="name"/> -			<column label="Contenu" name="content"/> -			<column label="Date" name="date"/> -		</scroll_list> -		<scroll_list name="notification_rejects_list"> -			<column label="Nom" name="name"/> -			<column label="Contenu" name="content"/> -			<column label="Date" name="date"/> -		</scroll_list> +	     <layout_panel name="notifications_list_panel" > +			<scroll_list name="notifications_list"> +				<column label="Nom" name="name"/> +				<column label="Contenu" name="content"/> +				<column label="Date" name="date"/> +			</scroll_list> +		</layout_panel> +	     <layout_panel name="rejects_list_panel" > +			<scroll_list name="notification_rejects_list"> +				<column label="Nom" name="name"/> +				<column label="Contenu" name="content"/> +				<column label="Date" name="date"/> +			</scroll_list> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml index f6b9bdcb81..f16fcebd02 100644 --- a/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml @@ -7,9 +7,9 @@  		0.2  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="Le média est en cours de chargement"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/it/floater_voice_controls.xml b/indra/newview/skins/default/xui/it/floater_voice_controls.xml index d2fd462062..4741d8d32f 100644 --- a/indra/newview/skins/default/xui/it/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/it/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="Il mio avatar:"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="Abbandona chiamata" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +				<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="Abbandona chiamata" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +        </layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/it/panel_notes.xml b/indra/newview/skins/default/xui/it/panel_notes.xml index 9ce6b47a32..945bff1603 100644 --- a/indra/newview/skins/default/xui/it/panel_notes.xml +++ b/indra/newview/skins/default/xui/it/panel_notes.xml @@ -1,7 +1,7 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel label="Note e Privacy" name="panel_notes">  	<layout_stack name="layout"> -		<panel name="notes_stack"> +		<layout_panel name="notes_stack">  			<scroll_container name="profile_scroll">  				<panel name="profile_scroll_panel">  					<text name="status_message" value="Le mie note private:"/> @@ -11,13 +11,13 @@  					<check_box label="Modificare, eliminare o prendere i miei oggetti" name="objects_check"/>  				</panel>  			</scroll_container> -		</panel> -		<panel name="notes_buttons_panel"> +		</layout_panel> +		<layout_panel name="notes_buttons_panel">  			<button label="Aggiungi amico" name="add_friend" tool_tip="Offri amicizia a questo residente"/>  			<button label="IM" name="im" tool_tip="Apri una sessione messaggio istantaneo"/>  			<button label="Chiama" name="call" tool_tip="Chiama questo residente"/>  			<button label="Mappa" name="show_on_map_btn" tool_tip="Mostra il residente sulla mappa"/>  			<button label="Teleport" name="teleport" tool_tip="Offri teleport"/> -		</panel> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml index ef7aaf2e8c..4620d72977 100644 --- a/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/it/panel_prim_media_controls.xml @@ -13,9 +13,9 @@  		50  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="L'elemento multimediale è in caricamento"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/ja/floater_voice_controls.xml b/indra/newview/skins/default/xui/ja/floater_voice_controls.xml index 4b95aa544f..0caca22bc1 100644 --- a/indra/newview/skins/default/xui/ja/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/ja/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="マイ アバター:"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="コール終了" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +			<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="コール終了" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +		</layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml b/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml index 5723535fd2..aff427ed49 100644 --- a/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml +++ b/indra/newview/skins/default/xui/ja/panel_notifications_channel.xml @@ -1,15 +1,19 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel name="notifications_panel">  	<layout_stack name="stack1"> -		<scroll_list name="notifications_list"> -			<column label="名前" name="name"/> -			<column label="コンテンツ" name="content"/> -			<column label="日付" name="date"/> -		</scroll_list> -		<scroll_list name="notification_rejects_list"> -			<column label="名前" name="name"/> -			<column label="コンテンツ" name="content"/> -			<column label="日付" name="date"/> -		</scroll_list> +		<layout_panel name="notifications_list_panel"> +			<scroll_list name="notifications_list"> +				<column label="名前" name="name"/> +				<column label="コンテンツ" name="content"/> +				<column label="日付" name="date"/> +			</scroll_list> +		</layout_panel> +		<layout_panel name="rejects_list_panel"> +			<scroll_list name="notification_rejects_list"> +				<column label="名前" name="name"/> +				<column label="コンテンツ" name="content"/> +				<column label="日付" name="date"/> +			</scroll_list> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml index a9897c7ae4..5506373eb0 100644 --- a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml @@ -7,9 +7,9 @@  		0.2  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="ローディング"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/pl/floater_voice_controls.xml b/indra/newview/skins/default/xui/pl/floater_voice_controls.xml index c222e4edbb..80200cfb21 100644 --- a/indra/newview/skins/default/xui/pl/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/pl/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="Mój awatar:"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="Zakończ rozmowę" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +			<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="Zakończ rozmowę" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +		</layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/pl/panel_notes.xml b/indra/newview/skins/default/xui/pl/panel_notes.xml index 35cb7e1bce..ec6008065f 100644 --- a/indra/newview/skins/default/xui/pl/panel_notes.xml +++ b/indra/newview/skins/default/xui/pl/panel_notes.xml @@ -1,7 +1,7 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel label="Notatki & Prywatność" name="panel_notes">  	<layout_stack name="layout"> -		<panel name="notes_stack"> +		<layout_panel name="notes_stack">  			<scroll_container name="profile_scroll">  				<panel name="profile_scroll_panel">  					<text name="status_message" value="Notatki:"/> @@ -11,13 +11,13 @@  					<check_box label="Edytowanie, kasowanie lub zabieranie moich obiektów" name="objects_check"/>  				</panel>  			</scroll_container> -		</panel> -		<panel name="notes_buttons_panel"> +		</layout_panel> +		<layout_panel name="notes_buttons_panel">  			<button label="Dodaj do znajomych" name="add_friend" tool_tip="Zaoferuj znajomość Rezydentowi"/>  			<button label="IM" name="im" tool_tip="Otwórz wiadomości IM"/>  			<button label="Dzwoń" name="call" tool_tip="Zadzwoń do Rezydenta"/>  			<button label="Mapa" name="show_on_map_btn" tool_tip="Pokaż Rezydenta na mapie"/>  			<button label="Teleportuj" name="teleport" tool_tip="Teleportuj"/> -		</panel> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml index f10ce5ea4d..7f66ac5d93 100644 --- a/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/pl/panel_prim_media_controls.xml @@ -13,9 +13,9 @@  		50  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="Wczytywanie mediów"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back"> diff --git a/indra/newview/skins/default/xui/pt/floater_voice_controls.xml b/indra/newview/skins/default/xui/pt/floater_voice_controls.xml index 44f08b76b5..2337ee3074 100644 --- a/indra/newview/skins/default/xui/pt/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/pt/floater_voice_controls.xml @@ -19,10 +19,12 @@  		<layout_panel name="my_panel">  			<text name="user_text" value="Meu avatar:"/>  		</layout_panel> -		<layout_stack name="voice_effect_and_leave_call_stack"> -			<layout_panel name="leave_call_btn_panel"> -				<button label="Desligar" name="leave_call_btn"/> -			</layout_panel> -		</layout_stack> +        <layout_panel name="leave_call_panel"> +			<layout_stack name="voice_effect_and_leave_call_stack"> +				<layout_panel name="leave_call_btn_panel"> +					<button label="Desligar" name="leave_call_btn"/> +				</layout_panel> +			</layout_stack> +		</layout_panel>  	</layout_stack>  </floater> diff --git a/indra/newview/skins/default/xui/pt/panel_notes.xml b/indra/newview/skins/default/xui/pt/panel_notes.xml index 9aa842d9a5..6fb614a8c4 100644 --- a/indra/newview/skins/default/xui/pt/panel_notes.xml +++ b/indra/newview/skins/default/xui/pt/panel_notes.xml @@ -1,7 +1,7 @@  <?xml version="1.0" encoding="utf-8" standalone="yes"?>  <panel label="Anotações e Privacidade" name="panel_notes">  	<layout_stack name="layout"> -		<panel name="notes_stack"> +		<layout_panel name="notes_stack">  			<scroll_container name="profile_scroll">  				<panel name="profile_scroll_panel">  					<text name="status_message" value="Minhas anotações privadas:"/> @@ -11,13 +11,13 @@  					<check_box label="Pegar, editar ou excluir objetos meus" name="objects_check"/>  				</panel>  			</scroll_container> -		</panel> -		<panel name="notes_buttons_panel"> +		</layout_panel> +		<layout_panel name="notes_buttons_panel">  			<button label="Adicionar amigo" name="add_friend" tool_tip="Oferecer amizade ao residente"/>  			<button label="MI" name="im" tool_tip="Abrir sessão de mensagem instantânea"/>  			<button label="Ligar" name="call" tool_tip="Ligar para este residente"/>  			<button label="Mapa" name="show_on_map_btn" tool_tip="Exibir o residente no mapa"/>  			<button label="Teletransportar" name="teleport" tool_tip="Oferecer teletransporte"/> -		</panel> +		</layout_panel>  	</layout_stack>  </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml index a1254b4da0..9e07b6772f 100644 --- a/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/pt/panel_prim_media_controls.xml @@ -13,9 +13,9 @@  		50  	</string>  	<layout_stack name="progress_indicator_area"> -		<panel name="media_progress_indicator"> +		<layout_panel name="media_progress_indicator">  			<progress_bar name="media_progress_bar" tool_tip="Carregando mídia"/> -		</panel> +		</layout_panel>  	</layout_stack>  	<layout_stack name="media_controls">  		<layout_panel name="back">  | 
