diff options
| -rw-r--r-- | indra/newview/llinspectavatar.cpp | 17 | ||||
| -rw-r--r-- | indra/newview/llpanelprofileview.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/inspect_avatar.xml | 35 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_profile_view.xml | 30 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/widgets/inspector.xml | 1 | 
5 files changed, 78 insertions, 20 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 1cd1dcc7f0..77435ae214 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -58,6 +58,7 @@  #include "llfloater.h"  #include "llfloaterreg.h"  #include "llmenubutton.h" +#include "lltextbox.h"  #include "lltooltip.h"	// positionViewNearMouse()  #include "lltrans.h"  #include "lluictrl.h" @@ -333,6 +334,7 @@ void LLInspectAvatar::requestUpdate()  	// Clear out old data so it doesn't flash between old and new  	getChild<LLUICtrl>("user_name")->setValue(""); +	getChild<LLUICtrl>("user_name_small")->setValue("");  	getChild<LLUICtrl>("user_slid")->setValue("");  	getChild<LLUICtrl>("user_subtitle")->setValue("");  	getChild<LLUICtrl>("user_details")->setValue(""); @@ -617,8 +619,23 @@ void LLInspectAvatar::onAvatarNameCache(  	if (agent_id == mAvatarID)  	{  		getChild<LLUICtrl>("user_name")->setValue(av_name.mDisplayName); +		getChild<LLUICtrl>("user_name_small")->setValue(av_name.mDisplayName);  		getChild<LLUICtrl>("user_slid")->setValue(av_name.mUsername);  		mAvatarName = av_name; +		 +		// show smaller display name if too long to display in regular size +		if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth()) +		{ +			getChild<LLUICtrl>("user_name_small")->setVisible( true ); +			getChild<LLUICtrl>("user_name")->setVisible( false ); +		} +		else +		{ +			getChild<LLUICtrl>("user_name_small")->setVisible( false ); +			getChild<LLUICtrl>("user_name")->setVisible( true ); + +		} +  	}  } diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index d22d8d2718..ab235f2b75 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -207,7 +207,22 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,  										   const LLAvatarName& av_name)  {  	getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName ); +	getChild<LLUICtrl>("user_name_small")->setValue( av_name.mDisplayName );  	getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername ); + +	// show smaller display name if too long to display in regular size +	if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth()) +	{ +		getChild<LLUICtrl>("user_name_small")->setVisible( true ); +		getChild<LLUICtrl>("user_name")->setVisible( false ); +	} +	else +	{ +		getChild<LLUICtrl>("user_name_small")->setVisible( false ); +		getChild<LLUICtrl>("user_name")->setVisible( true ); + +	} +  }  // EOF diff --git a/indra/newview/skins/default/xui/en/inspect_avatar.xml b/indra/newview/skins/default/xui/en/inspect_avatar.xml index d018ea7ce1..b2efd13441 100644 --- a/indra/newview/skins/default/xui/en/inspect_avatar.xml +++ b/indra/newview/skins/default/xui/en/inspect_avatar.xml @@ -15,7 +15,7 @@   single_instance="true"   sound_flags="0"   visible="true" - width="228"> + width="245">    <!-- Allowed fields include:  	[BORN_ON] ("12/3/2008")  	[SL_PROFILE] (Second Life profile), @@ -34,16 +34,29 @@      </string>    <text       follows="top|left" -     font="SansSerifLarge" -     height="16" +     font="SansSerif" +     height="20"       left="8" -     name="user_name" -     top="10" +     name="user_name_small" +     top="7"       text_color="White"       use_ellipses="true" -     value="Grumpity ProductEngine" -     width="175" /> -    <text +     word_wrap="true" +     value="Grumpity ProductEngine with a long name" +     width="185" /> +   <text +    follows="top|left" +    font="SansSerifBigLarge" +    height="21" +    left="8" +    name="user_name" +    top="10" +    text_color="White" +    use_ellipses="true" +    visible="false"  +    value="Grumpity ProductEngine" +    width="190" /> +   <text       follows="top|left"       height="16"       left="8" @@ -71,9 +84,9 @@       name="user_details"       right="-10"       word_wrap="true" -     top_pad="6" +     top_pad="4"       use_ellipses="true" -     width="220">This is my second life description and I really think it is great. +     width="220">This is my second life description and I really think it is great. But for some reason my description is super extra long because I like to talk a whole lot      </text>      <slider       follows="top|left" @@ -87,7 +100,7 @@       tool_tip="Voice volume"       top_pad="0"       value="0.5" -     width="195" /> +     width="200" />      <button       follows="top|left"       height="16" diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml index 9745f89e31..5778d3cb6f 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_view.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml @@ -28,17 +28,30 @@       tab_stop="false"       top="2"       width="30" /> -    <text_editor +     <text      	h_pad="0"      	v_pad="0" -      allow_scroll="false" -      bg_visible="false" -      read_only = "true"        follows="top|left|right" -      font="SansSerifHugeBold" -      height="26" +      font="SansSerifBigBold" +      height="29"        layout="topleft"        left_pad="5" +      name="user_name_small" +      text_color="LtGray" +      top="0" +      value="(Loading...)" +      use_ellipses="true" +      word_wrap="true"  +      visible="false"  +      width="275" /> +     <text +      h_pad="0" +      v_pad="0" +      follows="top|left|right" +      font="SansSerifHugeBold" +      height="27" +      layout="topleft" +      left_delta="0"        name="user_name"        text_color="LtGray"        top="2" @@ -52,7 +65,6 @@       left="45"       name="user_slid"       text_color="LtGray" -     value=""       width="150" />      <text       follows="top|left" @@ -67,7 +79,7 @@       width="150" />      <tab_container       follows="all" -     height="538" +     height="537"       halign="center"       layout="topleft"       left="5" @@ -77,7 +89,7 @@       tab_height="30"       tab_position="top"       top_pad="5" -     width="317"> +     width="317">           <panel           class="panel_profile"           filename="panel_profile.xml" diff --git a/indra/newview/skins/default/xui/en/widgets/inspector.xml b/indra/newview/skins/default/xui/en/widgets/inspector.xml index 428b2ce03b..8c171c387f 100644 --- a/indra/newview/skins/default/xui/en/widgets/inspector.xml +++ b/indra/newview/skins/default/xui/en/widgets/inspector.xml @@ -1,5 +1,6 @@  <?xml version="1.0" encoding="utf-8" standalone="yes" ?>  <inspector name="inspector" +           max_width="300"             bg_opaque_color="DkGray_66"             background_visible="true"             bg_opaque_image="Inspector_Hover"  | 
