Skip to content

Commit

Permalink
#2559 No mouseover if a link is embedded with an emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
LLGuru committed Sep 24, 2024
1 parent 1175288 commit 86d2fb9
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 130 deletions.
25 changes: 21 additions & 4 deletions indra/llui/llstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ LLStyle::Params::Params()
image("image"),
link_href("href"),
is_link("is_link")
{}

{
}

LLStyle::LLStyle(const LLStyle::Params& p)
: mVisible(p.visible),
Expand All @@ -57,14 +57,31 @@ LLStyle::LLStyle(const LLStyle::Params& p)
mDropShadow(p.drop_shadow),
mImagep(p.image()),
mAlpha(p.alpha)
{}
{
}

LLStyle* LLStyle::makeCopy() const
{
LLStyle* copy = new LLStyle();
copy->mDropShadow = mDropShadow;
copy->mFontName = mFontName;
copy->mLink = mLink;
copy->mColor = mColor;
copy->mReadOnlyColor = mReadOnlyColor;
copy->mSelectedColor = mSelectedColor;
copy->mFont = mFont;
copy->mImagep = mImagep;
copy->mAlpha = mAlpha;
copy->mVisible = mVisible;
copy->mIsLink = mIsLink;
return copy;
}

void LLStyle::setFont(const LLFontGL* font)
{
mFont = font;
}


const LLFontGL* LLStyle::getFont() const
{
return mFont;
Expand Down
11 changes: 8 additions & 3 deletions indra/llui/llstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#include "lluiimage.h"

class LLFontGL;
class LLStyle;

typedef LLPointer<LLStyle> LLStyleSP;
typedef LLPointer<const LLStyle> LLStyleConstSP;

class LLStyle : public LLRefCount
{
Expand All @@ -52,6 +56,9 @@ class LLStyle : public LLRefCount
Params();
};
LLStyle(const Params& p = Params());
LLStyleSP clone() const { return makeCopy(); }
LLStyleConstSP cloneConst() const { return makeCopy(); }

public:
const LLUIColor& getColor() const { return mColor; }
void setColor(const LLUIColor &color) { mColor = color; }
Expand Down Expand Up @@ -104,6 +111,7 @@ class LLStyle : public LLRefCount

protected:
~LLStyle() = default;
LLStyle* makeCopy() const;

private:
std::string mFontName;
Expand All @@ -118,7 +126,4 @@ class LLStyle : public LLRefCount
bool mIsLink;
};

typedef LLPointer<LLStyle> LLStyleSP;
typedef LLPointer<const LLStyle> LLStyleConstSP;

#endif // LL_LLSTYLE_H
Loading

0 comments on commit 86d2fb9

Please sign in to comment.