summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-10-28 14:42:46 -0700
committerSteve Bennetts <steve@lindenlab.com>2009-10-28 14:42:46 -0700
commit59407cdb9c40d96cf0c4fb13ee5f3a59934ef655 (patch)
treef45910812f862f113881b227158b9ee582f5e3fd /indra/newview/llchathistory.cpp
parent9a196cdda8fa62b90f6f390b21986712d198f03e (diff)
parenta81e91138201f913fc2f1034f7def6d307567f52 (diff)
merge
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index ebf46a6e3f..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)
{
}
@@ -101,24 +101,32 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr
if (mLastFromName == from)
{
view = getSeparator();
- view_text = " ";
+ view_text = "\n";
}
else
{
view = getHeader(avatar_id, from, time);
- view_text = "\n" + from + MESSAGE_USERNAME_DATE_SEPARATOR + time;
+ view_text = from + MESSAGE_USERNAME_DATE_SEPARATOR + time + '\n';
}
//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
- appendText(message, TRUE, style_params);
+ message += '\n';
+ appendText(message, FALSE, style_params);
mLastFromName = from;
blockUndo();