diff options
author | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-03-03 11:43:48 +0200 |
---|---|---|
committer | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-03-03 11:43:48 +0200 |
commit | 0f04222acc13802d1b16dff49e17dc52c1cfae2a (patch) | |
tree | be024a4e2b19b425a99d40fdddd1702d006b6698 /indra/newview | |
parent | 2cc7478e76c2de328cabbce323493bff9f1c94f8 (diff) |
fix for normal EXT-1391 Group Info: Avatar name should end with ellipsis if it doesn't fit free space
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llnamelistctrl.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llnamelistctrl.h | 2 |
2 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 114fef8712..d6073aa0d8 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -138,6 +138,29 @@ void LLNameListCtrl::showInspector(const LLUUID& avatar_id, bool is_group) LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", avatar_id)); } +void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index ) +{ + if (getHighlightedItemInx()!= target_index) + { + if(getHighlightedItemInx()!=-1) + { + LLScrollListItem* item = getItemList()[getHighlightedItemInx()]; + LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); + if(cell) + cell->setTextWidth(cell->getTextWidth() + 16); + } + if(target_index != -1) + { + LLScrollListItem* item = getItemList()[target_index]; + LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); + if(cell) + cell->setTextWidth(cell->getTextWidth() - 16); + } + } + + LLScrollListCtrl::mouseOverHighlightNthItem(target_index); +} + //virtual BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask) { diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 23b1cb6897..1c26ee5db4 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -120,6 +120,8 @@ public: void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; } /*virtual*/ void updateColumns(); + + /*virtual*/ void mouseOverHighlightNthItem( S32 index ); private: void showInspector(const LLUUID& avatar_id, bool is_group); |