diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 32f500ccbd..4c1ee6534e 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -504,6 +504,9 @@ public: void setWordWrap(bool wrap); LLScrollContainer* getScrollContainer() const { return mScroller; } + // Getter for line spacing (pixels) + S32 getLineSpacingPixels() const { return mLineSpacingPixels; } + protected: // protected member variables // List of offsets and segment index of the start of each line. Always has at least one node (0). diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index 8994d4cab9..d832a7cff5 100755 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -70,7 +70,10 @@ const LLUUID& LLToastPanel::getID() S32 LLToastPanel::computeSnappedToMessageHeight(LLTextBase* message, S32 maxLineCount) { S32 heightDelta = 0; - S32 maxTextHeight = message->getFont()->getLineHeight() * maxLineCount; + // Don't forget about line spacing! + //S32 maxTextHeight = message->getFont()->getLineHeight() * maxLineCount; + S32 maxTextHeight = (message->getFont()->getLineHeight() + message->getLineSpacingPixels()) * maxLineCount; + // LLRect messageRect = message->getRect(); S32 oldTextHeight = messageRect.getHeight();