diff options
author | richard <none@none> | 2010-01-15 13:18:40 -0800 |
---|---|---|
committer | richard <none@none> | 2010-01-15 13:18:40 -0800 |
commit | 4c4c68a3408c85e49d365c31be93e006be612ab1 (patch) | |
tree | 7e2770442f60e8099380fd4ac27f4076c19e3376 | |
parent | 4acf56d2a79a4f3bb555977aeaef21e15e26f684 (diff) | |
parent | cf2beaeea6d4ccd8a0a0448660ddd120aeed5823 (diff) |
merge
-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 |