From 12c38ccd6a614a0c62615906aec647a3d665b465 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 22 Oct 2009 18:09:07 -0700 Subject: Ext-1110 - Unable to select whole text by mouse in the text widget --- indra/newview/llchathistory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ebf46a6e3f..94058365be 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -101,12 +101,12 @@ 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(); @@ -118,7 +118,8 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0); //Append the text message - appendText(message, TRUE, style_params); + message += '\n'; + appendText(message, FALSE, style_params); mLastFromName = from; blockUndo(); -- cgit v1.2.3 From bb9fe04b5fcfdb8f0f386fa4c11bcaed3dd1ddff Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 28 Oct 2009 11:48:10 -0700 Subject: EXT-1949 - Viewer freezes on resizing IM window cleaned up some rectangle tracking logic and introduced LLInlineViewSegment param block reviewed by Leyla --- indra/newview/llchathistory.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview/llchathistory.cpp') 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'; -- cgit v1.2.3