Skip to content
Snippets Groups Projects
Commit 330ea83c authored by Leyla Farazha's avatar Leyla Farazha
Browse files

making profiles look nicer when display names isn't on

parent 84f06e40
No related branches found
No related tags found
No related merge requests found
......@@ -212,6 +212,8 @@ void LLPanelMyProfileEdit::onOpen(const LLSD& key)
getChild<LLUICtrl>("display_name_label")->setVisible( true );
getChild<LLUICtrl>("set_name")->setVisible( true );
getChild<LLUICtrl>("set_name")->setEnabled( true );
getChild<LLUICtrl>("solo_user_name")->setVisible( false );
getChild<LLUICtrl>("solo_username_label")->setVisible( false );
}
else
{
......@@ -220,6 +222,8 @@ void LLPanelMyProfileEdit::onOpen(const LLSD& key)
getChild<LLUICtrl>("display_name_label")->setVisible( false );
getChild<LLUICtrl>("set_name")->setVisible( false );
getChild<LLUICtrl>("set_name")->setEnabled( false );
getChild<LLUICtrl>("solo_user_name")->setVisible( true );
getChild<LLUICtrl>("solo_username_label")->setVisible( true );
}
}
......@@ -270,18 +274,8 @@ void LLPanelMyProfileEdit::onNameCache(const LLUUID& agent_id, const LLAvatarNam
getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
getChild<LLUICtrl>("user_name_small")->setValue( av_name.mDisplayName );
getChild<LLUICtrl>("solo_user_name")->setValue( av_name.mDisplayName );
// 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 );
}
if (LLAvatarNameCache::useDisplayNames())
{
......@@ -290,6 +284,21 @@ void LLPanelMyProfileEdit::onNameCache(const LLUUID& agent_id, const LLAvatarNam
getChild<LLUICtrl>("display_name_label")->setVisible( true );
getChild<LLUICtrl>("set_name")->setVisible( true );
getChild<LLUICtrl>("set_name")->setEnabled( true );
getChild<LLUICtrl>("solo_user_name")->setVisible( false );
getChild<LLUICtrl>("solo_username_label")->setVisible( false );
// 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 );
}
}
else
{
......@@ -298,6 +307,11 @@ void LLPanelMyProfileEdit::onNameCache(const LLUUID& agent_id, const LLAvatarNam
getChild<LLUICtrl>("display_name_label")->setVisible( false );
getChild<LLUICtrl>("set_name")->setVisible( false );
getChild<LLUICtrl>("set_name")->setEnabled( false );
getChild<LLUICtrl>("solo_user_name")->setVisible( true );
getChild<LLUICtrl>("user_name_small")->setVisible( false );
getChild<LLUICtrl>("user_name")->setVisible( false );
getChild<LLUICtrl>("solo_username_label")->setVisible( true );
}
}
......@@ -351,6 +365,8 @@ void LLPanelMyProfileEdit::resetData()
//childSetTextArg("name_text", "[LAST]", LLStringUtil::null);
getChild<LLUICtrl>("user_name")->setValue( LLSD() );
getChild<LLUICtrl>("user_slid")->setValue( LLSD() );
getChild<LLUICtrl>("solo_user_name")->setValue( LLSD() );
getChild<LLUICtrl>("user_name_small")->setValue( LLSD() );
}
void LLPanelMyProfileEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl)
......
......@@ -222,7 +222,6 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
{
getChild<LLUICtrl>("user_name_small")->setVisible( false );
getChild<LLUICtrl>("user_name")->setVisible( true );
}
if (LLAvatarNameCache::useDisplayNames())
......@@ -232,6 +231,7 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
getChild<LLUICtrl>("display_name_label")->setVisible( true );
getChild<LLUICtrl>("copy_to_clipboard")->setVisible( true );
getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( true );
getChild<LLUICtrl>("solo_username_label")->setVisible( false );
}
else
{
......@@ -240,6 +240,7 @@ void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
getChild<LLUICtrl>("display_name_label")->setVisible( false );
getChild<LLUICtrl>("copy_to_clipboard")->setVisible( false );
getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( false );
getChild<LLUICtrl>("solo_username_label")->setVisible( true );
}
}
......
......@@ -96,6 +96,17 @@
name="display_name_label"
text_color="LtGray"
value="Display Name:"
width="80" />
<text
top="5"
follows="top|left"
height="13"
layout="topleft"
left="10"
name="solo_username_label"
text_color="LtGray"
value="Username:"
visible="false"
width="80" />
<button
name="set_name"
......@@ -112,13 +123,26 @@
font="SansSerifBigBold"
height="20"
layout="topleft"
left_pad="10"
name="user_name"
left="10"
name="solo_user_name"
text_color="white"
top_delta="3"
value="Hamilton Hitchings"
use_ellipses="true"
visible="true"
use_ellipses="true"
visible="false"
width="275" />
<text
follows="top|left"
font="SansSerifBigBold"
height="20"
layout="topleft"
left="43"
name="user_name"
text_color="white"
top_delta="0"
value="Hamilton Hitchings"
use_ellipses="true"
visible="true"
width="250" />
<text
follows="top|left"
......@@ -131,7 +155,7 @@
top_delta="-4"
value="Hamilton Hitchings"
use_ellipses="true"
visible="false"
visible="false"
wrap="true"
width="245" />
<text
......@@ -141,7 +165,7 @@
left="10"
name="user_label"
text_color="LtGray"
top_pad="8"
top_pad="8"
value="Username:"
width="70" />
<text
......
......@@ -38,6 +38,17 @@
text_color="LtGray"
value="Display Name:"
width="80" />
<text
top_delta="0"
follows="top|left"
height="13"
layout="topleft"
left="45"
name="solo_username_label"
text_color="LtGray"
value="Username:"
visible="false"
width="80" />
<text
follows="top|right"
halign="right"
......@@ -108,7 +119,7 @@
top_delta="-2"
use_ellipses="true"
value="jack.linden"
width="205"
width="195"
wrap="true "/>
<tab_container
follows="all"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment