summaryrefslogtreecommitdiff
path: root/indra/llui/lltooltip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltooltip.cpp')
-rw-r--r--indra/llui/lltooltip.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index d7228c78bd..01c7a81309 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -300,9 +300,8 @@ void LLToolTip::initFromParams(const LLToolTip::Params& p)
mTextBox->setText(p.message());
}
- LLRect text_contents_rect = mTextBox->getContentsRect();
- S32 text_width = llmin(p.max_width(), text_contents_rect.getWidth());
- S32 text_height = text_contents_rect.getHeight();
+ S32 text_width = llmin(p.max_width(), mTextBox->getTextPixelWidth());
+ S32 text_height = mTextBox->getTextPixelHeight();
mTextBox->reshape(text_width, text_height);
// reshape tooltip panel to fit text box