diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-23 14:03:02 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-23 14:03:02 +0200 |
commit | fc2596e3c2cc7ca8d9a26cd85ef54c6bb7c17944 (patch) | |
tree | c6c55987e7749bf409f25a5680d5cdd9f72bccc8 /indra | |
parent | 3f43e07b33942c54bf81aac1d466c3eb771b8a8d (diff) |
fix for EXT-637 Please, add tooltips with a full names of the landmraks in the Favor bar / Overflow menu
rect param actually do nothing. to change tooltip width we may manipulate max_width param.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 832626e007..28e6f1321b 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -162,9 +162,22 @@ public: if (!region_name.empty()) { LLToolTip::Params params; - params.message = llformat("%s\n%s (%d, %d, %d)", getLabelSelected().c_str(), region_name.c_str(), + std::string extra_message = llformat("%s (%d, %d, %d)", region_name.c_str(), mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY(), mLandmarkInfoGetter.getPosZ()); - params.sticky_rect = calcScreenRect(); + + params.message = llformat("%s\n%s", getLabelSelected().c_str(), extra_message.c_str()); + + LLRect rect = calcScreenRect(); + LLFontGL* standart_font = LLFontGL::getFontSansSerif(); + if(standart_font) + { + S32 w = llmax((S32)(standart_font->getWidthF32(getLabelSelected())+0.5),(S32)(standart_font->getWidthF32(extra_message)+0.5)); + rect.mRight = rect.mLeft + w; + params.max_width = w; + } + + params.sticky_rect = rect; + LLToolTipMgr::instance().show(params); } return TRUE; |