diff options
Diffstat (limited to 'indra/llui/lltooltip.cpp')
-rw-r--r-- | indra/llui/lltooltip.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 959313a5b6..cf135997b2 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 |