diff options
-rw-r--r-- | indra/llui/lltextbase.cpp | 20 | ||||
-rw-r--r-- | indra/newview/skins/default/colors.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/inspect_group.xml | 11 |
3 files changed, 21 insertions, 12 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/colors.xml b/indra/newview/skins/default/colors.xml index 85cb145dbc..acb3262093 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -686,6 +686,6 @@ value="0.3 0.3 0.3 1.0" /> <color name="ChatToastAgentNameColor" - value="1.0 0.3 1.0 1.0" /> + reference="EmphasisColor" /> </colors> diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml index 3929e3277a..37ae5a64d7 100644 --- a/indra/newview/skins/default/xui/en/inspect_group.xml +++ b/indra/newview/skins/default/xui/en/inspect_group.xml @@ -9,7 +9,7 @@ bg_opaque_image="Inspector_Background" can_close="false" can_minimize="false" - height="148" + height="158" layout="topleft" name="inspect_group" single_instance="true" @@ -49,6 +49,7 @@ height="45" left="8" name="group_details" + use_ellipses="true" top_pad="6" width="220" word_wrap="true"> @@ -60,7 +61,7 @@ Fear the moose! Fear it! And the mongoose too! height="13" left="8" name="group_cost" - top_pad="3" + top_pad="13" width="220"> L$123 to join </text> @@ -78,7 +79,7 @@ L$123 to join height="23" label="Join" left="8" - top="266" + top="286" name="join_btn" width="103" commit_callback.function="InspectGroup.Join"/> @@ -87,7 +88,7 @@ L$123 to join height="23" label="Leave" left="8" - top="266" + top="286" name="leave_btn" width="103" commit_callback.function="InspectGroup.Leave"/> @@ -96,7 +97,7 @@ L$123 to join height="23" label="View Profile" name="view_profile_btn" - top="266" + top="286" left="117" width="103" commit_callback.function="InspectGroup.ViewProfile" /> |