diff options
author | richard <none@none> | 2009-10-28 11:48:10 -0700 |
---|---|---|
committer | richard <none@none> | 2009-10-28 11:48:10 -0700 |
commit | bb9fe04b5fcfdb8f0f386fa4c11bcaed3dd1ddff (patch) | |
tree | 14e7b84ea33344325b8a9c4e59ea71f66b1fcd29 /indra/newview/llchathistory.cpp | |
parent | afb9df7643443f62a154f93c0f3eb39dfc218a48 (diff) |
EXT-1949 - Viewer freezes on resizing IM window
cleaned up some rectangle tracking logic and introduced LLInlineViewSegment param block
reviewed by Leyla
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 94058365be..fbb57e35f4 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -48,7 +48,7 @@ mMessageSeparatorFilename(p.message_separator), mLeftTextPad(p.left_text_pad), mRightTextPad(p.right_text_pad), mLeftWidgetPad(p.left_widget_pad), -mRightWidgetPad(p.rigth_widget_pad) +mRightWidgetPad(p.right_widget_pad) { } @@ -110,12 +110,19 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr } //Prepare the rect for the view LLRect target_rect = getDocumentView()->getRect(); - target_rect.mLeft += mLeftWidgetPad; + // squeeze down the widget by subtracting padding off left and right + target_rect.mLeft += mLeftWidgetPad + mHPad; target_rect.mRight -= mRightWidgetPad; view->reshape(target_rect.getWidth(), view->getRect().getHeight()); view->setOrigin(target_rect.mLeft, view->getRect().mBottom); - appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0); + LLInlineViewSegment::Params p; + p.view = view; + p.force_newline = true; + p.left_pad = mLeftWidgetPad; + p.right_pad = mRightWidgetPad; + + appendWidget(p, view_text, false); //Append the text message message += '\n'; |