diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2010-02-03 16:25:32 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2010-02-03 16:25:32 +0200 |
commit | cb03e6f92a5d89056ef83e97fe436a165bb3ae78 (patch) | |
tree | 8ff50226830761179ec5faf9020fbc58143acf59 /indra/newview | |
parent | 6ebbc5edf6c95f68088577f82b2c1daf73b68205 (diff) |
fixed EXT-4776 Make avatars in nearby chat inspectable
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchathistory.cpp | 30 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_chat_header.xml | 7 |
2 files changed, 34 insertions, 3 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 64226ac52b..a351c52ce2 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -53,7 +53,9 @@ #include "llagent.h" #include "llnotificationsutil.h" #include "lltoastnotifypanel.h" +#include "lltooltip.h" #include "llviewerregion.h" +#include "llviewertexteditor.h" #include "llworld.h" #include "lluiconstants.h" @@ -111,6 +113,34 @@ public: return LLPanel::handleMouseUp(x,y,mask); } + //*TODO remake it using mouse enter/leave and static LLHandle<LLIconCtrl> to add/remove as a child + BOOL handleToolTip(S32 x, S32 y, MASK mask) + { + LLViewerTextEditor* name = getChild<LLViewerTextEditor>("user_name"); + if (name && name->parentPointInView(x, y) && mAvatarID.notNull() && SYSTEM_FROM != mFrom) + { + + // Spawn at right side of the name textbox. + LLRect sticky_rect = name->calcScreenRect(); + S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3); + + LLToolTip::Params params; + params.background_visible(false); + params.click_callback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, 0, 0, 0)); + params.delay_time(0.0f); // spawn instantly on hover + params.image(LLUI::getUIImage("Info_Small")); + params.message(""); + params.padding(0); + params.pos(LLCoordGL(icon_x, sticky_rect.mTop - 2)); + params.sticky_rect(sticky_rect); + + LLToolTipMgr::getInstance()->show(params); + return TRUE; + } + + return LLPanel::handleToolTip(x, y, mask); + } + void onObjectIconContextMenuItemClicked(const LLSD& userdata) { std::string level = userdata.asString(); diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 39c4923f12..89d632c4c6 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -21,19 +21,20 @@ width="18" /> <text_editor allow_scroll="false" - v_pad = "0" + v_pad = "7" read_only = "true" follows="left|right" font.style="BOLD" - height="12" + height="24" layout="topleft" left_pad="5" right="-120" name="user_name" text_color="white" bg_readonly_color="black" - top="8" + top="0" use_ellipses="true" + valign="bottom" value="Ericag Vader" /> <text font="SansSerifSmall" |