summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-05-09 16:02:03 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2013-05-09 16:02:03 -0700
commit359c3d520eaf8de818081db32812387416add26a (patch)
tree86d034e51cf985eb817b0759e1a214b7080fae91 /indra
parent2d65482d7152b613409a071e0a117d38f350932a (diff)
ACME-342 Format the PersonView so that it shows the avatar icon, SL name, FB icon, and FB name: Rendering now matches the UX spec.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llui/llfolderviewitem.cpp12
-rw-r--r--indra/newview/llpanelpeople.cpp6
-rw-r--r--indra/newview/llpersontabview.cpp25
3 files changed, 27 insertions, 16 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 0c0c54c38c..f061313645 100755
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -307,7 +307,12 @@ std::set<LLFolderViewItem*> LLFolderViewItem::getSelectionList() const
// addToFolder() returns TRUE if it succeeds. FALSE otherwise
void LLFolderViewItem::addToFolder(LLFolderViewFolder* folder)
{
- folder->addItem(this);
+ folder->addItem(this);
+
+ // Compute indentation since parent folder changed
+ mIndentation = (getParentFolder())
+ ? getParentFolder()->getIndentation() + mLocalIndentation
+ : 0;
}
@@ -940,6 +945,11 @@ LLFolderViewFolder::~LLFolderViewFolder( void )
void LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder)
{
folder->addFolder(this);
+
+ // Compute indentation since parent folder changed
+ mIndentation = (getParentFolder())
+ ? getParentFolder()->getIndentation() + mLocalIndentation
+ : 0;
}
static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange");
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 07a1c46256..420225f260 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -731,7 +731,7 @@ BOOL LLPanelPeople::postBuild()
folder_view_params.listener = base_item;
folder_view_params.view_model = &mPersonFolderViewModel;
folder_view_params.root = NULL;
- folder_view_params.use_ellipses = false;
+ folder_view_params.use_ellipses = true;
folder_view_params.use_label_suffix = true;
folder_view_params.options_menu = "menu_conversation.xml";
folder_view_params.name = "fbcfolderview";
@@ -1677,7 +1677,7 @@ void LLPanelPeople::showFacebookFriends(const LLSD& friends)
void LLPanelPeople::addTestParticipant()
{
std::string suffix("Aa");
- std::string prefix("Second Life User Name Goes Here");
+ std::string prefix("Facebook User Name");
LLPersonTabModel * person_tab_model;
LLUUID agentID;
std::string name;
@@ -1726,7 +1726,7 @@ void LLPanelPeople::addParticipantToModel(LLPersonTabModel * person_folder_model
avatar_name_string = avatar_name.getDisplayName();
}
- person_model = new LLPersonModel(agent_id, name, avatar_name_string, mPersonFolderViewModel);
+ person_model = new LLPersonModel(agent_id, avatar_name_string, name, mPersonFolderViewModel);
person_folder_model->addParticipant(person_model);
}
diff --git a/indra/newview/llpersontabview.cpp b/indra/newview/llpersontabview.cpp
index 16ebb6af90..d4c73cd53f 100644
--- a/indra/newview/llpersontabview.cpp
+++ b/indra/newview/llpersontabview.cpp
@@ -173,6 +173,8 @@ S32 LLPersonView::getLabelXPos()
void LLPersonView::addToFolder(LLFolderViewFolder * person_folder_view)
{
+ const LLFontGL * font = LLFontGL::getFontSansSerifSmall();
+
LLFolderViewItem::addToFolder(person_folder_view);
//Added item to folder could change folder's mHasVisibleChildren flag so call arrange
person_folder_view->requestArrange();
@@ -183,6 +185,17 @@ void LLPersonView::addToFolder(LLFolderViewFolder * person_folder_view)
{
mAvatarIcon->setVisible(TRUE);
mFacebookIcon->setVisible(TRUE);
+
+ S32 label_width = font->getWidth(mLabel);
+ F32 text_left = (F32)getLabelXPos();
+
+ LLRect mFacebookIconRect = mFacebookIcon->getRect();
+ S32 new_left = text_left + label_width + 7;
+ mFacebookIconRect.set(new_left,
+ mFacebookIconRect.mTop,
+ new_left + mFacebookIconRect.getWidth(),
+ mFacebookIconRect.mBottom);
+ mFacebookIcon->setRect(mFacebookIconRect);
}
else if(mPersonTabModel->mTabType == LLPersonTabModel::FB_ONLY_FRIEND)
{
@@ -288,18 +301,6 @@ void LLPersonView::draw()
drawHighlight();
drawLabel(mLabel, font, text_left, y, color, right_x);
-
- if(mLabelSuffix.length())
- {
- LLRect mFacebookIconRect = mFacebookIcon->getRect();
- S32 new_left = right_x + 7;
- mFacebookIconRect.set(new_left,
- mFacebookIconRect.mTop,
- new_left + mFacebookIconRect.getWidth(),
- mFacebookIconRect.mBottom);
- mFacebookIcon->setRect(mFacebookIconRect);
- }
-
drawLabel(mLabelSuffix, font, mFacebookIcon->getRect().mRight + 7, y, color, right_x);
LLView::draw();