meow-7.2.2
Merov Linden 2012-10-31 13:05:36 -07:00
commit e672984a48
4 changed files with 20 additions and 7 deletions

View File

@ -432,6 +432,22 @@ void LLConversationViewParticipant::draw()
LLView::draw();
}
// virtual
S32 LLConversationViewParticipant::arrange(S32* width, S32* height)
{
//Need to call arrange first since it computes value used in getIndentation()
S32 arranged = LLFolderViewItem::arrange(width, height);
//Adjusts the avatar icon based upon the indentation
LLRect avatarRect(getIndentation(),
mAvatarIcon->getRect().mTop,
getIndentation() + mAvatarIcon->getRect().getWidth(),
mAvatarIcon->getRect().mBottom);
mAvatarIcon->setShape(avatarRect);
return arranged;
}
void LLConversationViewParticipant::selectItem()
{
LLConversationItem* vmi = this->getParentFolder() ? static_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL;
@ -507,7 +523,7 @@ void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask)
S32 LLConversationViewParticipant::getLabelXPos()
{
return mAvatarIcon->getRect().mRight + mIconPad;
return getIndentation() + mAvatarIcon->getRect().getWidth() + mIconPad;
}
// static

View File

@ -129,6 +129,7 @@ protected:
void initFromParams(const Params& params);
BOOL postBuild();
/*virtual*/ void draw();
/*virtual*/ S32 arrange(S32* width, S32* height);
void onInfoBtnClick();

View File

@ -1289,9 +1289,6 @@ LLConversationViewParticipant* LLIMFloaterContainer::createConversationViewParti
LLRect panel_rect = mConversationsListPanel->getRect();
params.name = item->getDisplayName();
//params.icon = bridge->getIcon();
//params.icon_open = bridge->getOpenIcon();
//params.creation_date = bridge->getCreationDate();
params.root = mConversationsRoot;
params.listener = item;
@ -1299,7 +1296,8 @@ LLConversationViewParticipant* LLIMFloaterContainer::createConversationViewParti
params.rect = LLRect (0, 24, panel_rect.getWidth(), 0);
params.tool_tip = params.name;
params.participant_id = item->getUUID();
params.folder_indentation = 42;
return LLUICtrlFactory::create<LLConversationViewParticipant>(params);
}

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<conversation_view_participant
folder_arrow_image="Folder_Arrow"
folder_indentation="0"
item_height="24"
item_top_pad="0"
selection_image="Rounded_Square"
@ -20,7 +19,6 @@
height="20"
default_icon_name="Generic_Person"
layout="topleft"
left="50"
top="2"
width="20" />
<info_button