summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llconsole.cpp4
-rw-r--r--indra/llui/llfloater.cpp6
-rw-r--r--indra/llui/llfolderview.cpp7
-rw-r--r--indra/llui/llfolderviewmodel.cpp5
-rw-r--r--indra/llui/lltoolbar.cpp2
-rw-r--r--indra/llui/lltooltip.cpp4
-rw-r--r--indra/llui/llurlentry.cpp2
-rw-r--r--indra/llui/llview.cpp8
-rw-r--r--indra/newview/lltoolpie.cpp3
9 files changed, 26 insertions, 15 deletions
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 7817d99aef..de09fdbafd 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -180,7 +180,9 @@ void LLConsole::draw()
LLUIImagePtr imagep = LLUI::getUIImage("transparent");
- F32 console_opacity = llclamp(LLUI::getInstance()->mSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
+ static LLCachedControl<F32> console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f);
+ F32 console_opacity = llclamp((F32)console_bg_opacity, 0.f, 1.f);
+
LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
color.mV[VALPHA] *= console_opacity;
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index abb043f428..5ea4a36a6c 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -378,13 +378,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 e718fcec46..483862298c 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -342,7 +342,9 @@ static LLTrace::BlockTimerStatHandle FTM_FILTER("Filter Folder View");
void LLFolderView::filter( LLFolderViewFilter& filter )
{
LL_RECORD_BLOCK_TIME(FTM_FILTER);
- filter.resetTime(llclamp(LLUI::getInstance()->mSettingGroups["config"]->getS32(mParentPanel.get()->getVisible() ? "FilterItemsMaxTimePerFrameVisible" : "FilterItemsMaxTimePerFrameUnvisible"), 1, 100));
+ static LLCachedControl<S32> time_visible(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
+ static LLCachedControl<S32> time_invisible(*LLUI::getInstance()->mSettingGroups["config"], "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);
@@ -661,7 +663,8 @@ void LLFolderView::draw()
closeAutoOpenedFolders();
}
- if (mSearchTimer.getElapsedTimeF32() > LLUI::getInstance()->mSettingGroups["config"]->getF32("TypeAheadTimeout") || !mSearchString.size())
+ static LLCachedControl<F32> type_ahead_timeout(*LLUI::getInstance()->mSettingGroups["config"], "TypeAheadTimeout", 1.5f);
+ if (mSearchTimer.getElapsedTimeF32() > type_ahead_timeout || !mSearchString.size())
{
mSearchString.clear();
}
diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp
index 3b45fb53a2..a91c3e07d4 100644
--- a/indra/llui/llfolderviewmodel.cpp
+++ b/indra/llui/llfolderviewmodel.cpp
@@ -48,8 +48,9 @@ std::string LLFolderViewModelCommon::getStatusText()
void LLFolderViewModelCommon::filter()
{
- getFilter().resetTime(llclamp(LLUI::getInstance()->mSettingGroups["config"]->getS32("FilterItemsMaxTimePerFrameVisible"), 1, 100));
- mFolderView->getViewModelItem()->filter(getFilter());
+ static LLCachedControl<S32> max_time(*LLUI::getInstance()->mSettingGroups["config"], "FilterItemsMaxTimePerFrameVisible", 10);
+ getFilter().resetTime(llclamp((S32)max_time, 1, 100));
+ mFolderView->getViewModelItem()->filter(getFilter());
}
bool LLFolderViewModelItemCommon::hasFilterStringMatch()
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index e6f466ec78..0961db37ba 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -1125,7 +1125,7 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
BOOL handled = FALSE;
S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
- S32 drag_threshold = LLUI::getInstance()->mSettingGroups["config"]->getS32("DragAndDropDistanceThreshold");
+ static LLCachedControl<S32> drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3);
if (mouse_distance_squared > drag_threshold * drag_threshold
&& hasMouseCapture() &&
mStartDragItemCallback && mHandleDragItemCallback)
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index 422534b781..1262e8a820 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -358,8 +358,8 @@ void LLToolTip::draw()
if (mFadeTimer.getStarted())
{
- F32 tool_tip_fade_time = LLUI::getInstance()->mSettingGroups["config"]->getF32("ToolTipFadeTime");
- alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time, 1.f, 0.f);
+ static LLCachedControl<F32> tool_tip_fade_time(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFadeTime", 0.2f);
+ alpha = clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, (F32)tool_tip_fade_time, 1.f, 0.f);
if (alpha == 0.f)
{
// finished fading out, so hide ourselves
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 333d03f208..3609f3b238 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 bd213d594a..8b889376b8 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -875,14 +875,16 @@ BOOL LLView::handleToolTip(S32 x, S32 y, MASK mask)
std::string tooltip = getToolTip();
if (!tooltip.empty())
{
+ static LLCachedControl<F32> tooltip_fast_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipFastDelay", 0.1f);
+ static LLCachedControl<F32> tooltip_delay(*LLUI::getInstance()->mSettingGroups["config"], "ToolTipDelay", 0.7f);
+ static LLCachedControl<bool> 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()
- ? LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipFastDelay" )
- : LLUI::getInstance()->mSettingGroups["config"]->getF32( "ToolTipDelay" );
+ ? tooltip_fast_delay
+ : tooltip_delay;
// Even if we don't show tooltips, consume the event, nothing below should show tooltip
- bool allow_ui_tooltips = LLUI::getInstance()->mSettingGroups["config"]->getBOOL("BasicUITooltips");
if (allow_ui_tooltips)
{
LLToolTipMgr::instance().show(LLToolTip::Params()
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index f499c34ca4..7d7cf23822 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1249,7 +1249,8 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
{
- if (!LLUI::getInstance()->mSettingGroups["config"]->getBOOL("ShowHoverTips")) return TRUE;
+ static LLCachedControl<bool> show_hover_tips(*LLUI::getInstance()->mSettingGroups["config"], "ShowHoverTips", true);
+ if (!show_hover_tips) return TRUE;
if (!mHoverPick.isValid()) return TRUE;
LLViewerObject* hover_object = mHoverPick.getObject();