From 978dd80c963911372b0d311fec01b9d4de279c11 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 12 Nov 2009 19:54:45 +0200 Subject: Implemented major sub-task EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label) --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/newview/llavatarlistitem.cpp') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 7df278d887..c670a65bcc 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -311,3 +311,18 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str mAvatarName->setValue(name); mAvatarName->setToolTip(name); } + +void LLAvatarListItem::reshapeAvatarName() +{ + S32 width_delta = 0; + width_delta += mShowProfileBtn ? mProfileBtnWidth : 0; + width_delta += mSpeakingIndicator->getVisible() ? mSpeakingIndicatorWidth : 0; + width_delta += mAvatarIcon->getVisible() ? mIconWidth : 0; + width_delta += mShowInfoBtn ? mInfoBtnWidth : 0; + width_delta += mLastInteractionTime->getVisible() ? mLastInteractionTime->getRect().getWidth() : 0; + + S32 height = mAvatarName->getRect().getHeight(); + S32 width = getRect().getWidth() - width_delta; + + mAvatarName->reshape(width, height); +} -- cgit v1.2.3