summaryrefslogtreecommitdiff
path: root/indra/llui/llurlentry.h
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-07-26 18:10:29 +0300
committerAndrew Dyukov <adyukov@productengine.com>2010-07-26 18:10:29 +0300
commit0c8cddecc16d5bd25a2eb5159333ada1dec59259 (patch)
treeb63308e612da0a6fdab7d4192ae4c51082404795 /indra/llui/llurlentry.h
parent20d55088894fa47f4320616f8c5b71afd16e98a0 (diff)
EXT-8010 FIXED Implemented special behaviour of avatar links.
Avatar links are now underlined only on hover. Also they have the same color as other links. - Underlining text and getting it back to normal are done in handleHover() and draw() of new LLOnHoverChangeableTextSegment class derived from LLNormalTextSegment. This class has two pointers to styles- one for style which will be used for text on hover, and another otherwise. This special type of text segment is used if link's boolean member mUnderlineOnHoverOnly is true. So it is URL's flag depending on which textbase adds new text segment(like it currently happens with mDisabledLink). - Changed avatar link color in colors.xml to emphasis (because it was white before and was inconsistent with other links). Reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/749/ --HG-- branch : product-engine
Diffstat (limited to 'indra/llui/llurlentry.h')
-rw-r--r--indra/llui/llurlentry.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 7d718b67a9..f8588dd760 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -94,6 +94,9 @@ public:
/// is this a match for a URL that should not be hyperlinked?
bool isLinkDisabled() const { return mDisabledLink; }
+ /// Should this link text be underlined only when mouse is hovered over it?
+ virtual bool underlineOnHoverOnly(const std::string &string) const { return false; }
+
virtual LLUUID getID(const std::string &string) const { return LLUUID::null; }
protected:
@@ -173,6 +176,7 @@ public:
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getTooltip(const std::string &string) const;
/*virtual*/ LLUUID getID(const std::string &string) const;
+ /*virtual*/ bool underlineOnHoverOnly(const std::string &string) const;
private:
void onAgentNameReceived(const LLUUID& id, const std::string& first,
const std::string& last, BOOL is_group);
@@ -275,6 +279,7 @@ public:
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getUrl(const std::string &string) const;
/*virtual*/ std::string getTooltip(const std::string &string) const;
+ /*virtual*/ bool underlineOnHoverOnly(const std::string &string) const;
};
///