diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index 819913783e7ce585dc319cf6b068288ece48786b..636d5a265a1ba1723a670d762cf53cc4cad2588b 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -182,6 +182,7 @@ void LLConsole::draw() static LLUICachedControl<F32> console_background_opacity("ConsoleBackgroundOpacity", 0.7f); F32 console_opacity = llclamp(console_background_opacity(), 0.f, 1.f); + static const LLUIColor color_background = LLUIColorTable::instance().getColor("ConsoleBackground"); auto color = color_background.get(); color.mV[VALPHA] *= console_opacity; diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 8359c01fe285bfb1876da560a31a6d1c8aaa3ad9..1816cb8e1a7d06308140467d5b0eb3a0c985739b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -384,13 +384,15 @@ void LLFloater::layoutDragHandle() // static void LLFloater::updateActiveFloaterTransparency() { - sActiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("ActiveFloaterTransparency"); + static LLCachedControl<F32> active_transparency(*LLUI::getInstance()->mSettingGroups["config"], "ActiveFloaterTransparency", 1.f); + sActiveControlTransparency = active_transparency; } // static void LLFloater::updateInactiveFloaterTransparency() { - sInactiveControlTransparency = LLUI::getInstance()->mSettingGroups["config"]->getF32("InactiveFloaterTransparency"); + static LLCachedControl<F32> inactive_transparency(*LLUI::getInstance()->mSettingGroups["config"], "InactiveFloaterTransparency", 0.95f); + sInactiveControlTransparency = inactive_transparency; } void LLFloater::addResizeCtrls() diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 402a0100c0c935d1e5e833de9786dcc3780c6a72..bdf8941ec760cddd55c119c48d1af73353760e29 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -335,9 +335,9 @@ static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View"); void LLFolderView::filter( LLFolderViewFilter& filter ) { LL_RECORD_BLOCK_TIME(FTM_FILTER); - static const LLUICachedControl<S32> filter_item_max_time_visible("FilterItemsMaxTimePerFrameVisible", 10); - static const LLUICachedControl<S32> filter_item_max_time_unvisible("FilterItemsMaxTimePerFrameUnvisible", 1); - filter.resetTime(llclamp(mParentPanel.get()->getVisible() ? static_cast<S32>(filter_item_max_time_visible) : static_cast<S32>(filter_item_max_time_unvisible), 1, 100)); + static const LLUICachedControl<S32> time_visible("FilterItemsMaxTimePerFrameVisible", 10); + static const LLUICachedControl<S32> time_invisible("FilterItemsMaxTimePerFrameUnvisible", 1); + filter.resetTime(llclamp((S32)(mParentPanel.get()->getVisible() ? time_visible : time_invisible), 1, 100)); // Note: we filter the model, not the view getViewModelItem()->filter(filter); @@ -656,7 +656,7 @@ void LLFolderView::draw() closeAutoOpenedFolders(); } - static LLUICachedControl<F32> type_ahead_timeout("TypeAheadTimeout", 0); + static LLUICachedControl<F32> type_ahead_timeout("TypeAheadTimeout", 1.5f); if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout || mSearchString.empty()) { mSearchString.clear(); diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index 2e9091f4b237be3d182d0bb354dc1f5f8b700170..21002a1a2c885856aeedefc6ca935e6869603a63 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -48,9 +48,9 @@ std::string LLFolderViewModelCommon::getStatusText() void LLFolderViewModelCommon::filter() { - static LLUICachedControl<S32> filter_item_max_time_visible("FilterItemsMaxTimePerFrameVisible", 10); - getFilter().resetTime(llclamp(filter_item_max_time_visible(), 1, 100)); - mFolderView->getViewModelItem()->filter(getFilter()); + static const LLUICachedControl<S32> max_time("FilterItemsMaxTimePerFrameVisible", 10); + getFilter().resetTime(llclamp(max_time(), 1, 100)); + mFolderView->getViewModelItem()->filter(getFilter()); } bool LLFolderViewModelItemCommon::hasFilterStringMatch() diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 7178f2fc5b9fca4530eb3ba7166ed3f0d9bea003..5b738fc519273fc4a2a43281f8926bfac53fb54f 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -176,7 +176,7 @@ void LLUrlEntryBase::callObservers(const std::string &id, bool LLUrlEntryBase::isLinkDisabled() const { // this allows us to have a global setting to turn off text hyperlink highlighting/action - bool globally_disabled = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("DisableTextHyperlinkActions"); + static LLCachedControl<bool> globally_disabled(*LLUI::getInstance()->mSettingGroups["config"], "DisableTextHyperlinkActions", false); return globally_disabled; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index ce131a38d63c7ff86ab83a57378daf5ddadc0b38..031a95ddf2d823a6a92464ae8eb88a4f22db2056 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -896,16 +896,16 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask) std::string tooltip = getToolTip(); if (!tooltip.empty()) { + static LLUICachedControl<F32> tooltip_fast_delay("ToolTipFastDelay", 0.1f); + static LLUICachedControl<F32> tooltip_delay("ToolTipDelay", 0.7f); + static LLUICachedControl<bool> allow_ui_tooltips("BasicUITooltips", true); // allow "scrubbing" over ui by showing next tooltip immediately // if previous one was still visible - static LLUICachedControl<F32> tool_tip_delay("ToolTipDelay", 0.69999f); - static LLUICachedControl<F32> tool_tip_fast_delay("ToolTipFastDelay", 0.1f); F32 timeout = LLToolTipMgr::instance().toolTipVisible() - ? tool_tip_fast_delay - : tool_tip_delay; + ? tooltip_fast_delay + : tooltip_delay; // Even if we don't show tooltips, consume the event, nothing below should show tooltip - static LLUICachedControl<bool> allow_ui_tooltips("BasicUITooltips", true); if (allow_ui_tooltips) { LLToolTipMgr::instance().show(LLToolTip::Params() diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 36126aea0fca3c06a0407801665ac73fca61dfbf..065ea2da678559781f9d9ba87a3b407be6a36009 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1377,7 +1377,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) { - static const LLCachedControl<bool> show_hover_tips(gSavedSettings, "ShowHoverTips"); + static const LLCachedControl<bool> show_hover_tips(gSavedSettings, "ShowHoverTips", true); if (!show_hover_tips) return TRUE; if (!mHoverPick.isValid()) return TRUE;