diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/lltextbase.cpp | 20 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_login.xml | 90 |
2 files changed, 60 insertions, 50 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index db16670f79..741ab1737d 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2397,12 +2397,20 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip) bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { - LLWString text = mEditor.getWText(); - height = mFontHeight; - width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); - // if last character is a newline, then return true, forcing line break - llwchar last_char = text[mStart + first_char + num_chars - 1]; + bool force_newline = false; + if (num_chars > 0) + { + LLWString text = mEditor.getWText(); + width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); + // if last character is a newline, then return true, forcing line break + llwchar last_char = text[mStart + first_char + num_chars - 1]; + force_newline = (last_char == '\n'); + } + else + { + width = 0; + } LLUIImagePtr image = mStyle->getImage(); if( image.notNull()) @@ -2411,7 +2419,7 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt height = llmax(height, image->getHeight()); } - return num_chars >= 1 && last_char == '\n'; + return force_newline; } S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index d07d4ea25f..aab7f23ecc 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -48,13 +48,13 @@ left="20" name="first_name_text" top="20" - width="135"> + width="150"> Name: </text> <line_editor follows="left|bottom" handle_edit_keys_directly="true" - height="23" + height="22" label="First" left_delta="0" max_length="31" @@ -66,7 +66,7 @@ <line_editor follows="left|bottom" handle_edit_keys_directly="true" - height="23" + height="22" label="Last" left_pad="8" max_length="31" @@ -75,38 +75,6 @@ tool_tip="[SECOND_LIFE] Last Name" top_delta="0" width="135" /> - <text - follows="left|bottom" - font="SansSerifSmall" - height="15" - left_pad="8" - name="start_location_text" - top="20" - width="135"> - Starting location: - </text> - <combo_box - allow_text_entry="true" - control_name="LoginLocation" - follows="left|bottom" - height="23" - max_chars="128" - top_pad="0" - name="start_location_combo" - width="135"> - <combo_box.item - label="My last location" - name="MyLastLocation" - value="last" /> - <combo_box.item - label="My home" - name="MyHome" - value="home" /> - <combo_box.item - label="<Type region name>" - name="Typeregionname" - value="" /> - </combo_box> <combo_box allow_text_entry="true" font="SansSerifSmall" @@ -121,21 +89,21 @@ follows="left|bottom" font="SansSerifSmall" height="15" - left_pad="3" + left_pad="8" name="password_text" top="20" - width="135"> + width="150"> Password: </text> <line_editor follows="left|bottom" handle_edit_keys_directly="true" - height="23" - left_delta="0" + height="22" + left="304" max_length="16" name="password_edit" select_on_focus="true" - top_pad="0" + top_pad="1" width="135" /> <check_box control_name="RememberPassword" @@ -143,10 +111,10 @@ font="SansSerifSmall" height="16" label="Remember" - left_pad="5" + left_pad="20" + top="20" name="remember_check" - top_delta="5" - width="90" /> + width="150" /> <button follows="left|bottom" height="23" @@ -155,10 +123,44 @@ label="Log In" label_color="White" layout="topleft" - left_pad="20" + left="462" name="connect_btn" top="35" width="90" /> + <text + follows="right|bottom" + font="SansSerifSmall" + height="15" + halign="right" + left_pad="10" + right="-210" + name="start_location_text" + top="20" + width="130"> + Starting location: + </text> + <combo_box + allow_text_entry="true" + control_name="LoginLocation" + follows="left|bottom" + height="23" + max_chars="128" + top_pad="0" + name="start_location_combo" + width="135"> + <combo_box.item + label="My last location" + name="MyLastLocation" + value="last" /> + <combo_box.item + label="My home" + name="MyHome" + value="home" /> + <combo_box.item + label="<Type region name>" + name="Typeregionname" + value="" /> + </combo_box> <text follows="right|bottom" font="SansSerifSmall" |