summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-18 22:22:07 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-18 22:22:16 +0300
commit706d8f17273f4718a2adf5a43c1de5a1dc08abad (patch)
treea13243cfa91992f8d187be55dd023e2dcd6240da /indra/newview
parent53ed0ec70ce5c774c57c9783050c7e1b35885eec (diff)
SL-19732 Fix folder's thumbnail from sticking over folder's content
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorypanel.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index edcd45db79..c5d3fa3f7a 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1311,10 +1311,18 @@ BOOL LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
params["inv_type"] = vm_item_p->getInventoryType();
params["thumbnail_id"] = vm_item_p->getThumbnailUUID();
params["item_id"] = vm_item_p->getUUID();
-
+
+ // tooltip should only show over folder, but screen
+ // rect includes items under folder as well
+ LLRect actionable_rect = hover_item_p->calcScreenRect();
+ if (hover_item_p->isOpen() && hover_item_p->hasVisibleChildren())
+ {
+ actionable_rect.mBottom = actionable_rect.mTop - hover_item_p->getItemHeight();
+ }
+
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(hover_item_p->getToolTip())
- .sticky_rect(hover_item_p->calcScreenRect())
+ .sticky_rect(actionable_rect)
.delay_time(LLView::getTooltipTimeout())
.create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
.create_params(params));