Feature Request: Allow use of a separate color for linked usernames.

The setting is HTMLAgentColor, I will not add this to preferences for now.

Note that usernames before the colon in the chat are cached,
set before login to change it for everyone or relog.
Also hook up getStyle() for the registered urls,
cleans up some code in lltexteditor.
This commit is contained in:
Lirusaito
2019-02-01 08:12:12 -05:00
parent a7886443c5
commit d20dbaa7d2
8 changed files with 65 additions and 45 deletions

View File

@@ -82,7 +82,7 @@ public:
virtual std::string getIcon(const std::string &url);
/// Return the style to render the displayed text
//virtual LLStyle::Params getStyle() const;
virtual LLStyleSP getStyle() const;
/// Given a matched Url, return a tooltip string for the hyperlink
virtual std::string getTooltip(const std::string &string) const { return mTooltip; }
@@ -232,7 +232,7 @@ public:
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) override;
/*virtual*/ std::string getIcon(const std::string &url) override;
/*virtual*/ std::string getTooltip(const std::string &string) const override;
///*virtual*/ LLStyle::Params getStyle() const override;
/*virtual*/ LLStyleSP getStyle() const override;
/*virtual*/ LLUUID getID(const std::string &string) const override;
/*virtual*/ bool underlineOnHoverOnly(const std::string &string) const override;
protected:
@@ -265,7 +265,7 @@ public:
}
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) override;
///*virtual*/ LLStyle::Params getStyle() const override;
/*virtual*/ LLStyleSP getStyle() const override;
protected:
// override this to pull out relevant name fields
virtual std::string getName(const LLAvatarName& avatar_name) = 0;
@@ -332,7 +332,7 @@ class LLUrlEntryGroup : public LLUrlEntryBase
public:
LLUrlEntryGroup();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) override;
///*virtual*/ LLStyle::Params getStyle() const override;
/*virtual*/ LLStyleSP getStyle() const override;
/*virtual*/ LLUUID getID(const std::string &string) const override;
private:
void onGroupNameReceived(const LLUUID& id, const std::string& name, bool is_group);
@@ -492,7 +492,7 @@ public:
LLUrlEntryNoLink();
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb) override;
/*virtual*/ std::string getUrl(const std::string &string) const override;
///*virtual*/ LLStyle::Params getStyle() const override;
/*virtual*/ LLStyleSP getStyle() const override;
};
///