summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llstyle.cpp29
-rw-r--r--indra/llui/llstyle.h5
-rw-r--r--indra/llui/lltextbase.cpp14
3 files changed, 11 insertions, 37 deletions
diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp
index 92c0b7c1b4..71511f69a4 100644
--- a/indra/llui/llstyle.cpp
+++ b/indra/llui/llstyle.cpp
@@ -44,10 +44,7 @@ LLStyle::Params::Params()
color("color", LLColor4::black),
font("font", LLFontGL::getFontMonospace()),
image("image"),
- link_href("href"),
- italic("italic", false ),
- bold("bold", false),
- underline("bold", false)
+ link_href("href")
{}
@@ -58,10 +55,7 @@ LLStyle::LLStyle(const LLStyle::Params& p)
mFont(p.font()),
mLink(p.link_href),
mDropShadow(p.drop_shadow),
- mImagep(p.image()),
- mItalic(p.italic()),
- mBold(p.bold),
- mUnderline(p.underline)
+ mImagep(p.image())
{}
void LLStyle::setFont(const LLFontGL* font)
@@ -75,25 +69,6 @@ const LLFontGL* LLStyle::getFont() const
return mFont;
}
-const S32 LLStyle::getFontStyle() const
-{
- S32 ret = 0;
- if (mBold)
- {
- ret |= LLFontGL::BOLD;
- }
- if (mItalic)
- {
- ret |= LLFontGL::ITALIC;
- }
- if (mUnderline)
- {
- ret |= LLFontGL::UNDERLINE;
- }
- return ret;
-}
-
-
void LLStyle::setLinkHREF(const std::string& href)
{
mLink = href;
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h
index cc72011903..ee9ca730e9 100644
--- a/indra/llui/llstyle.h
+++ b/indra/llui/llstyle.h
@@ -51,17 +51,12 @@ public:
Optional<const LLFontGL*> font;
Optional<LLUIImage*> image;
Optional<std::string> link_href;
- Optional<bool> italic;
- Optional<bool> bold;
- Optional<bool> underline;
Params();
};
LLStyle(const Params& p = Params());
public:
const LLColor4& getColor() const { return mColor; }
void setColor(const LLColor4 &color) { mColor = color; }
-
- const S32 getFontStyle() const;
const LLColor4& getReadOnlyColor() const { return mReadOnlyColor; }
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,