From 6ada89ce0b9372d6a7f49ac45bad6713ad5d3355 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 1 Feb 2023 00:35:22 +0200 Subject: SL-19117 Extend texture preview to show thumbnails when present --- indra/llui/llview.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 9ba71913d0..10e4755cd3 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -877,6 +877,17 @@ LLView* LLView::childFromPoint(S32 x, S32 y, bool recur) return 0; } +F32 LLView::getTooltipTimeout() +{ + static LLCachedControl tooltip_fast_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFastDelay", 0.1f); + static LLCachedControl tooltip_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipDelay", 0.7f); + // allow "scrubbing" over ui by showing next tooltip immediately + // if previous one was still visible + return (F32)(LLToolTipMgr::instance().toolTipVisible() + ? tooltip_fast_delay + : tooltip_delay); +} + BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; @@ -886,14 +897,7 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) std::string tooltip = getToolTip(); if (!tooltip.empty()) { - static LLCachedControl tooltip_fast_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFastDelay", 0.1f); - static LLCachedControl tooltip_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipDelay", 0.7f); static LLCachedControl allow_ui_tooltips(*LLUI::getInstance()->mSettingGroups["config"], "BasicUITooltips", true); - // allow "scrubbing" over ui by showing next tooltip immediately - // if previous one was still visible - F32 timeout = LLToolTipMgr::instance().toolTipVisible() - ? tooltip_fast_delay - : tooltip_delay; // Even if we don't show tooltips, consume the event, nothing below should show tooltip if (allow_ui_tooltips) @@ -901,7 +905,7 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) LLToolTipMgr::instance().show(LLToolTip::Params() .message(tooltip) .sticky_rect(calcScreenRect()) - .delay_time(timeout)); + .delay_time(getTooltipTimeout())); } handled = TRUE; } -- cgit v1.2.3 From 077841420cb1264b3a096f473f5005d83de94519 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 12 May 2023 16:35:27 +0300 Subject: SL-19649 reduce logging out time for larger inventories --- indra/llui/llview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 10e4755cd3..a2f18daa12 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -576,8 +576,10 @@ void LLView::deleteAllChildren() while (!mChildList.empty()) { - LLView* viewp = mChildList.front(); - delete viewp; // will remove the child from mChildList + LLView* viewp = mChildList.front(); + viewp->mParentView = NULL; + delete viewp; + mChildList.pop_front(); } } -- cgit v1.2.3 From 17e18aa9bfa095e8b41c1c0e45c5757101a3f710 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 12 May 2023 16:55:12 +0300 Subject: SL-19649 add missing update --- indra/llui/llview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index a2f18daa12..7720c4ad14 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -581,6 +581,7 @@ void LLView::deleteAllChildren() delete viewp; mChildList.pop_front(); } + updateBoundingRect(); } void LLView::setAllChildrenEnabled(BOOL b) -- cgit v1.2.3 From 4d3a8f4a6cd2bef58bc95854af0325ca0190351f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 May 2023 22:15:56 +0300 Subject: SL-19649 Don't update bounding rect excesively --- indra/llui/llview.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/llui/llview.cpp') diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 7720c4ad14..da7868d804 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -311,7 +311,13 @@ bool LLView::addChild(LLView* child, S32 tab_group) } child->mParentView = this; - updateBoundingRect(); + if (getVisible() && child->getVisible()) + { + // if child isn't visible it won't affect bounding rect + // if current view is not visible it will be recalculated + // on visibility change + updateBoundingRect(); + } mLastTabGroup = tab_group; return true; } -- cgit v1.2.3