diff options
-rw-r--r-- | indra/llui/lltextbase.cpp | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/chat_history.xml | 22 |
2 files changed, 19 insertions, 17 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5ebf49c488..17aecaf32f 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -346,7 +346,8 @@ void LLTextBase::drawSelectionBackground() S32 segment_line_start = segmentp->getStart() + segment_offset; S32 segment_line_end = llmin(segmentp->getEnd(), line_iter->mDocIndexEnd); - S32 segment_width, segment_height; + S32 segment_width = 0; + S32 segment_height = 0; // if selection after beginning of segment if(selection_left >= segment_line_start) @@ -433,7 +434,8 @@ void LLTextBase::drawCursor() if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection()) { - S32 segment_width, segment_height; + S32 segment_width = 0; + S32 segment_height = 0; segmentp->getDimensions(mCursorPos - segmentp->getStart(), 1, segment_width, segment_height); S32 width = llmax(CURSOR_THICKNESS, segment_width); cursor_rect.mRight = cursor_rect.mLeft + width; @@ -2443,10 +2445,12 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip) bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { - height = mFontHeight; + height = 0; + width = 0; bool force_newline = false; if (num_chars > 0) { + height = mFontHeight; LLWString text = mEditor.getWText(); // if last character is a newline, then return true, forcing line break llwchar last_char = text[mStart + first_char + num_chars - 1]; @@ -2461,10 +2465,6 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); } } - else - { - width = 0; - } LLUIImagePtr image = mStyle->getImage(); if( image.notNull()) diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml index 8785dff2ae..f6d1992c8e 100644 --- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml +++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml @@ -1,23 +1,25 @@ <?xml version="1.0" encoding="UTF-8"?> <chat_history - message_header="panel_chat_header.xml" - message_separator="panel_chat_separator.xml" - left_text_pad="10" - right_text_pad="15" - left_widget_pad="0" - right_widget_pad="10" - top_separator_pad="5" - bottom_separator_pad="5" - top_header_pad="17" - bottom_header_pad="10" + message_header="panel_chat_header.xml" + message_separator="panel_chat_separator.xml" + left_text_pad="10" + right_text_pad="15" + left_widget_pad="0" + right_widget_pad="10" + top_separator_pad="2" + bottom_separator_pad="2" + top_header_pad="12" + bottom_header_pad="5" max_length="2147483647" track_bottom="true" name="chat_history" type="string" word_wrap="true" + line_spacing.multiple="1.0" font="SansSerif"> <more_chat_text mouse_opaque="true" word_wrap="true" /> </chat_history> +enabledcontrol
\ No newline at end of file |