Fix calculation of message height area in a toast panel

meow-7.2.2
Ansariel 2015-10-30 10:35:43 +01:00
parent 651843ec2f
commit 0c09621895
2 changed files with 7 additions and 1 deletions

View File

@ -504,6 +504,9 @@ public:
void setWordWrap(bool wrap);
LLScrollContainer* getScrollContainer() const { return mScroller; }
// <FS:Ansariel> 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).

View File

@ -70,7 +70,10 @@ const LLUUID& LLToastPanel::getID()
S32 LLToastPanel::computeSnappedToMessageHeight(LLTextBase* message, S32 maxLineCount)
{
S32 heightDelta = 0;
S32 maxTextHeight = message->getFont()->getLineHeight() * maxLineCount;
// <FS:Ansariel> Don't forget about line spacing!
//S32 maxTextHeight = message->getFont()->getLineHeight() * maxLineCount;
S32 maxTextHeight = (message->getFont()->getLineHeight() + message->getLineSpacingPixels()) * maxLineCount;
// </FS:Ansariel>
LLRect messageRect = message->getRect();
S32 oldTextHeight = messageRect.getHeight();