summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofileview.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-08-13 17:33:04 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-08-13 17:33:04 -0700
commitbc60707968bd8b2cd2941357a6ff653f6ed2d40e (patch)
treed1d0dd93f3c8eab2cb063e16ce0d228ed44c7482 /indra/newview/llpanelprofileview.cpp
parent9bb2c74dc59073db5ad91e1053f9bd04836b4ce8 (diff)
DEV-52163 Long display name with wide characters not fully visible in viewer aside from nametag
Diffstat (limited to 'indra/newview/llpanelprofileview.cpp')
-rw-r--r--indra/newview/llpanelprofileview.cpp15
1 files changed, 15 insertions, 0 deletions
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