From d181b84dfdce83d1999d086c3eda2cdc51849a11 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 10 Nov 2009 17:10:47 -0800 Subject: EXT-1478 Tool-tip background and border colors are being ignored EXT-2082 Multifloater preview tab container extends outside window border EXT-773 odd notecard behaviour on closing an unsaved notcard reviewed by Richard --- indra/llui/lltextbase.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 97ba691341..8d36c9c616 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -286,8 +286,7 @@ bool LLTextBase::truncate() LLStyle::Params LLTextBase::getDefaultStyle() { - LLColor4 text_color = ( mReadOnly ? mReadOnlyFgColor.get() : mFgColor.get() ); - return LLStyle::Params().color(text_color).font(mDefaultFont).drop_shadow(mFontShadow); + return LLStyle::Params().color(mFgColor.get()).readonly_color(mReadOnlyFgColor.get()).font(mDefaultFont).drop_shadow(mFontShadow); } void LLTextBase::onValueChange(S32 start, S32 end) @@ -2232,7 +2231,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele const LLFontGL* font = mStyle->getFont(); - LLColor4 color = mStyle->getColor() % alpha; + LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % alpha; font = mStyle->getFont(); -- cgit v1.2.3 From 8523d2d5b641cb5b0e4557237700065bd24daf83 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Wed, 11 Nov 2009 17:05:36 +0200 Subject: fix for normal bug EXT-2303 Distinguish Object-generated Nearby Chat from other Nearby Chat --HG-- branch : product-engine --- indra/llui/lltextbase.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 97ba691341..69b45af3e7 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -995,6 +995,12 @@ void LLTextBase::setColor( const LLColor4& c ) mFgColor = c; } +//virtual +void LLTextBase::setReadOnlyColor(const LLColor4 &c) +{ + mReadOnlyFgColor = c; +} + //virtual void LLTextBase::setValue(const LLSD& value ) { -- cgit v1.2.3 From fedf86c216a36e46fcdec571399d44e6f5cbc836 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 11 Nov 2009 12:01:57 -0800 Subject: fix wrapping of text segment containing multiple newlines and ending on a newline reviewed by leyla --- indra/llui/lltextbase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 97ba691341..1a903d31f1 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2370,7 +2370,9 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt height = mFontHeight; width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); - return num_chars >= 1 && text[mStart + num_chars - 1] == '\n'; + // if last character is a newline, then return true, forcing line break + llwchar last_char = text[mStart + first_char + num_chars - 1]; + return num_chars >= 1 && last_char == '\n'; } S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const -- cgit v1.2.3