summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYchebotarev ProductEngine <ychebotarev@productengine.com>2010-03-03 12:43:39 +0200
committerYchebotarev ProductEngine <ychebotarev@productengine.com>2010-03-03 12:43:39 +0200
commit9180edf9c0d6e9d0600659709cead3ab17d6b7e3 (patch)
treea283fc1f49ee752acc8dcd07fcc8716273c467cb
parent0a16e7627ed0c54510c4a641be30e6dd554932db (diff)
remove hardcoded numbers
--HG-- branch : product-engine
-rw-r--r--indra/newview/llnamelistctrl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index d6073aa0d8..883d4cdf4b 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -47,6 +47,8 @@
static LLDefaultChildRegistry::Register<LLNameListCtrl> r("name_list");
+static const S32 info_icon_size = 16;
+
void LLNameListCtrl::NameTypeNames::declareValues()
{
declare("INDIVIDUAL", LLNameListCtrl::INDIVIDUAL);
@@ -147,14 +149,14 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index )
LLScrollListItem* item = getItemList()[getHighlightedItemInx()];
LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex));
if(cell)
- cell->setTextWidth(cell->getTextWidth() + 16);
+ cell->setTextWidth(cell->getTextWidth() + info_icon_size);
}
if(target_index != -1)
{
LLScrollListItem* item = getItemList()[target_index];
LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex));
if(cell)
- cell->setTextWidth(cell->getTextWidth() - 16);
+ cell->setTextWidth(cell->getTextWidth() - info_icon_size);
}
}
@@ -187,7 +189,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
// Spawn at right side of cell
LLPointer<LLUIImage> icon = LLUI::getUIImage("Info_Small");
- LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop - (sticky_rect.getHeight() - icon->getHeight())/2 );
+ LLCoordGL pos( sticky_rect.mRight - info_icon_size, sticky_rect.mTop - (sticky_rect.getHeight() - icon->getHeight())/2 );
// Should we show a group or an avatar inspector?
bool is_group = hit_item->getValue()["is_group"].asBoolean();