Fix calculation of message height area in a toast panel
parent
651843ec2f
commit
0c09621895
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue