diff options
| author | Merov Linden <merov@lindenlab.com> | 2010-11-01 22:54:40 -0700 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2010-11-01 22:54:40 -0700 | 
| commit | 75e609fffb0e4900f047602b5e862d61b27eee3c (patch) | |
| tree | cef4c8e45a5e5f6cd4710ed1160686c18a27e0af /indra | |
| parent | 9d5678ae3104c2b69e7c280b5007c2f66e7fc9de (diff) | |
| parent | ea7420a7b3e1f68b8eb78a6e8ebd13683f7716b9 (diff) | |
STORM-293 : merge with viewer-development
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llavatarlistitem.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llavatarlistitem.h | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml | 1 | 
3 files changed, 11 insertions, 5 deletions
| diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index a56dc129d4..30eecfe323 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -41,7 +41,7 @@  bool LLAvatarListItem::sStaticInitialized = false;  S32 LLAvatarListItem::sLeftPadding = 0; -S32 LLAvatarListItem::sRightNamePadding = 0; +S32 LLAvatarListItem::sNameRightPadding = 0;  S32 LLAvatarListItem::sChildrenWidths[LLAvatarListItem::ALIC_COUNT];  static LLWidgetNameRegistry::StaticRegistrar sRegisterAvatarListItemParams(&typeid(LLAvatarListItem::Params), "avatar_list_item"); @@ -52,7 +52,8 @@ LLAvatarListItem::Params::Params()  	voice_call_joined_style("voice_call_joined_style"),  	voice_call_left_style("voice_call_left_style"),  	online_style("online_style"), -	offline_style("offline_style") +	offline_style("offline_style"), +	name_right_pad("name_right_pad", 0)  {}; @@ -119,6 +120,9 @@ BOOL  LLAvatarListItem::postBuild()  		// so that we can hide and show them again later.  		initChildrenWidths(this); +		// Right padding between avatar name text box and nearest visible child. +		sNameRightPadding = LLUICtrlFactory::getDefaultParams<LLAvatarListItem>().name_right_pad; +  		sStaticInitialized = true;  	} @@ -486,7 +490,6 @@ void LLAvatarListItem::initChildrenWidths(LLAvatarListItem* avatar_item)  	S32 icon_width = avatar_item->mAvatarName->getRect().mLeft - avatar_item->mAvatarIcon->getRect().mLeft;  	sLeftPadding = avatar_item->mAvatarIcon->getRect().mLeft; -	sRightNamePadding = avatar_item->mLastInteractionTime->getRect().mLeft - avatar_item->mAvatarName->getRect().mRight;  	S32 index = ALIC_COUNT;  	sChildrenWidths[--index] = icon_width; @@ -565,7 +568,7 @@ void LLAvatarListItem::updateChildren()  	// apply paddings  	name_new_width -= sLeftPadding; -	name_new_width -= sRightNamePadding; +	name_new_width -= sNameRightPadding;  	name_view_rect.setLeftTopAndSize(  		name_new_left, diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index a069838ac3..c95ac39696 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -51,6 +51,8 @@ public:  									online_style,  									offline_style; +		Optional<S32>				name_right_pad; +  		Params();  	}; @@ -215,7 +217,7 @@ private:  	static bool	sStaticInitialized; // this variable is introduced to improve code readability  	static S32  sLeftPadding; // padding to first left visible child (icon or name) -	static S32  sRightNamePadding; // right padding from name to next visible child +	static S32  sNameRightPadding; // right padding from name to next visible child  	/**  	 * Contains widths of each child specified by EAvatarListItemChildIndex diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml index ed8df69bf4..1bb3188cc8 100644 --- a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml @@ -1,5 +1,6 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <avatar_list_item + name_right_pad="5"   height="0"   layout="topleft"   left="0" | 
