summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexteditor.cpp
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-10-20 00:41:41 +0000
committerRichard Nelson <richard@lindenlab.com>2009-10-20 00:41:41 +0000
commitce5a5f84d5b5aee95b0b130d0fbdb8fbaa688ba7 (patch)
treeb710655439feee3af795dd3311edd4bbf93d5568 /indra/newview/llviewertexteditor.cpp
parentb36eee458126f191022c4483d3a496cbbf7dc30c (diff)
ext-1670 - fix the chat history use of widgets
reviewed by leyla
Diffstat (limited to 'indra/newview/llviewertexteditor.cpp')
-rw-r--r--indra/newview/llviewertexteditor.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 0ce1ecc6ee..65994dfb30 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -130,15 +130,17 @@ public:
mToolTip = inv_item->getName() + '\n' + inv_item->getDescription();
}
- /*virtual*/ S32 getWidth(S32 first_char, S32 num_chars) const
+ /*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
{
if (num_chars == 0)
{
- return 0;
+ width = 0;
+ height = 0;
}
else
{
- return EMBEDDED_ITEM_LABEL_PADDING + mImage->getWidth() + mStyle->getFont()->getWidth(mLabel.c_str());
+ width = EMBEDDED_ITEM_LABEL_PADDING + mImage->getWidth() + mStyle->getFont()->getWidth(mLabel.c_str());
+ height = llmax(mImage->getHeight(), llceil(mStyle->getFont()->getLineHeight()));
}
}
@@ -169,10 +171,6 @@ public:
return right_x;
}
- /*virtual*/ S32 getMaxHeight() const
- {
- return llmax(mImage->getHeight(), llceil(mStyle->getFont()->getLineHeight()));
- }
/*virtual*/ bool canEdit() const { return false; }