From ce5a5f84d5b5aee95b0b130d0fbdb8fbaa688ba7 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 20 Oct 2009 00:41:41 +0000 Subject: ext-1670 - fix the chat history use of widgets reviewed by leyla --- indra/newview/llviewertexteditor.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewertexteditor.cpp') 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; } -- cgit v1.2.3