summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 12:27:46 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 12:27:46 +0300
commite59216443619dd2280ce0fff316a2b9e2ee7cf5e (patch)
tree27d782916858596d67a60ecf56ca07b6a44a4601 /indra/llui/llview.cpp
parentdcb85f9f9d1019bb046a5719bc3645fa96a2d060 (diff)
parentbb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff)
Merge branch 'main' into release/maint-c
# Conflicts: # indra/llui/lltexteditor.cpp # indra/newview/llcontrolavatar.cpp
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index a41b7ba4a8..877585cbef 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -898,6 +898,34 @@ F32 LLView::getTooltipTimeout()
: tooltip_delay);
}
+// virtual
+const std::string LLView::getToolTip() const
+{
+ if (sDebugUnicode)
+ {
+ std::string text = getText();
+ if (!text.empty())
+ {
+ const std::string& name = getName();
+ std::string tooltip = llformat("Name: \"%s\"", name.c_str());
+
+ if (const LLFontGL* font = getFont())
+ {
+ tooltip += llformat("\nFont: %s (%s)",
+ font->getFontDesc().getName().c_str(),
+ font->getFontDesc().getSize().c_str()
+ );
+ }
+
+ tooltip += "\n\n" + utf8str_showBytesUTF8(text);
+
+ return tooltip;
+ }
+ }
+
+ return mToolTipMsg.getString();
+}
+
BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;