From 1baf1d218644ac5dc00d9b41119a1ef168c709a2 Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 16 Nov 2009 20:46:40 +0800 Subject: fix chat format for /me --- indra/llui/lltextbase.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 7b1aaac35c..d7697ac7cc 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1506,9 +1506,8 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c LLStyle::Params link_params = style_params; link_params.color = match.getColor(); // apply font name from requested style_params - std::string font_name = LLFontGL::nameFromFont(style_params.font()); - link_params.font.name.setIfNotProvided(font_name); - link_params.font.style = "UNDERLINE"; + std::string font_name = LLFontGL::nameFromFont(style_params.font()); + link_params.underline = true; link_params.link_href = match.getUrl(); // output the text before the Url @@ -2251,7 +2250,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele rect.mLeft, rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, - 0, + mStyle->getFontStyle(), mStyle->getShadowType(), length, rect.getWidth(), &right_x, @@ -2270,7 +2269,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele rect.mLeft, rect.mTop, LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ), LLFontGL::LEFT, LLFontGL::TOP, - 0, + mStyle->getFontStyle(), LLFontGL::NO_SHADOW, length, rect.mRight, &right_x, @@ -2287,7 +2286,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele rect.mLeft, rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, - 0, + mStyle->getFontStyle(), mStyle->getShadowType(), length, rect.mRight, &right_x, -- cgit v1.2.3 From 0098bf40ea73078e2164ae55a8fa2f9049d0d4e9 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 17 Nov 2009 16:33:49 +0800 Subject: undo the changes for LLStyle params; add sizeFromFont in LLFontGL ; use font.style, font.name and font.size params for font creating --- indra/llui/lltextbase.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index d7697ac7cc..a06b7e237b 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1506,8 +1506,12 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c LLStyle::Params link_params = style_params; link_params.color = match.getColor(); // apply font name from requested style_params - std::string font_name = LLFontGL::nameFromFont(style_params.font()); - link_params.underline = true; + std::string font_name = LLFontGL::nameFromFont(style_params.font()); + std::string font_size = LLFontGL::sizeFromFont(style_params.font()); + link_params.font.name(font_name); + link_params.font.size(font_name); + link_params.font.style("UNDERLINE"); + link_params.link_href = match.getUrl(); // output the text before the Url @@ -2250,7 +2254,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele rect.mLeft, rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, - mStyle->getFontStyle(), + 0, mStyle->getShadowType(), length, rect.getWidth(), &right_x, @@ -2269,7 +2273,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele rect.mLeft, rect.mTop, LLColor4( 1.f - color.mV[0], 1.f - color.mV[1], 1.f - color.mV[2], 1.f ), LLFontGL::LEFT, LLFontGL::TOP, - mStyle->getFontStyle(), + 0, LLFontGL::NO_SHADOW, length, rect.mRight, &right_x, @@ -2286,7 +2290,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele rect.mLeft, rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, - mStyle->getFontStyle(), + 0, mStyle->getShadowType(), length, rect.mRight, &right_x, -- cgit v1.2.3 From a2041387b1c39328aaf0d5037ca039a971a6d79c Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 17 Nov 2009 10:02:01 -0800 Subject: Fix broken URL highlighting in local chat, broken in 5068 : ce08ac445035. Typo, not reviewed. --- indra/llui/lltextbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index a06b7e237b..caaf47240f 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1509,7 +1509,7 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c std::string font_name = LLFontGL::nameFromFont(style_params.font()); std::string font_size = LLFontGL::sizeFromFont(style_params.font()); link_params.font.name(font_name); - link_params.font.size(font_name); + link_params.font.size(font_size); link_params.font.style("UNDERLINE"); link_params.link_href = match.getUrl(); -- cgit v1.2.3