From 145a5ffe7f57ec87b0604c2e06104a4eb3cb8644 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 22 Sep 2023 01:01:42 +0300 Subject: SL-15039 Prune unused preferences #3 DebugInventoryFilters DebugShowXUINames DebugSlshareLogTag DebugStat**** DefaultBlankNormalTexture DefaultObjectNormalTexture DefaultObjectSpecularTexture DefaultUploadCost DisplayAvatarAgentTarget DisplayChat DisplayDebug DisplayDebugConsole DisplayIM DisplayLinden DisplayRegion DragAndDropToolTipDelay DragAndDropDistanceThreshold DropShadowButton DropShadowFloater DropShadowSlider DropShadowTooltip UIImgWhiteUUID UseEnvironmentFromRegion UseDayCycle WaterPresetName SkyPresetName DayCycleName DestinationGuideHintTimeout SidePanelHintTimeout DisablePrecacheDelayAfterTeleporting --- indra/llprimitive/llprimitive.cpp | 6 +- indra/llprimitive/llprimitive.h | 2 +- indra/llui/llbutton.cpp | 1 + indra/llui/llbutton.h | 2 +- indra/llui/llcombobox.cpp | 15 +- indra/llui/llfloater.cpp | 3 +- indra/llui/llfolderviewitem.cpp | 4 +- indra/llui/llmenugl.cpp | 3 +- indra/llui/llmodaldialog.cpp | 3 +- indra/llui/lltoolbar.cpp | 3 +- indra/llui/llui.h | 2 +- indra/llui/lluictrl.h | 1 + indra/newview/app_settings/settings.xml | 766 +-------------------- indra/newview/llagentcamera.cpp | 3 +- indra/newview/llfloaterenvironmentadjust.cpp | 2 +- indra/newview/lllocationinputctrl.cpp | 3 +- indra/newview/llnavigationbar.cpp | 3 +- indra/newview/llpaneleditwater.cpp | 2 +- indra/newview/llpanelface.cpp | 12 +- indra/newview/llpanelobject.cpp | 6 +- indra/newview/lltexturectrl.cpp | 11 +- indra/newview/lltexturectrl.h | 7 + indra/newview/lltoastalertpanel.cpp | 3 +- indra/newview/lltooldraganddrop.cpp | 7 +- indra/newview/lltoolpie.cpp | 3 +- indra/newview/llviewerwindow.cpp | 6 +- .../skins/default/xui/en/floater_media_browser.xml | 12 +- 27 files changed, 69 insertions(+), 822 deletions(-) diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 67c225d25d..bfc9bc0861 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -107,7 +107,7 @@ const F32 FLEXIBLE_OBJECT_DEFAULT_LENGTH = 1.0f; const BOOL FLEXIBLE_OBJECT_DEFAULT_USING_COLLISION_SPHERE = FALSE; const BOOL FLEXIBLE_OBJECT_DEFAULT_RENDERING_COLLISION_SPHERE = FALSE; -const char *SCULPT_DEFAULT_TEXTURE = "be293869-d0d9-0a69-5989-ad27f1946fd4"; // old inverted texture: "7595d345-a24c-e7ef-f0bd-78793792133e"; +const LLUUID SCULPT_DEFAULT_TEXTURE("be293869-d0d9-0a69-5989-ad27f1946fd4"); // old inverted texture: "7595d345-a24c-e7ef-f0bd-78793792133e"; // Texture rotations are sent over the wire as a S16. This is used to scale the actual float // value to a S16. Don't use 7FFF as it introduces some odd rounding with 180 since it @@ -1946,7 +1946,7 @@ bool LLFlexibleObjectData::fromLLSD(LLSD& sd) LLSculptParams::LLSculptParams() { mType = PARAMS_SCULPT; - mSculptTexture.set(SCULPT_DEFAULT_TEXTURE); + mSculptTexture = SCULPT_DEFAULT_TEXTURE; mSculptType = LL_SCULPT_TYPE_SPHERE; } @@ -2032,7 +2032,7 @@ void LLSculptParams::setSculptTexture(const LLUUID& texture_id, U8 sculpt_type) U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK; if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX) { - mSculptTexture.set(SCULPT_DEFAULT_TEXTURE); + mSculptTexture = SCULPT_DEFAULT_TEXTURE; mSculptType = LL_SCULPT_TYPE_SPHERE; } else diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 309b18faa9..ba76fe1ac5 100644 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -89,7 +89,7 @@ extern const F32 OBJECT_REV_MIN; extern const F32 OBJECT_REV_MAX; extern const F32 OBJECT_REV_INC; -extern const char *SCULPT_DEFAULT_TEXTURE; +extern const LLUUID SCULPT_DEFAULT_TEXTURE; //============================================================================ diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index fe9908a475..061c24db50 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -62,6 +62,7 @@ template class LLButton* LLView::getChild( S32 LLBUTTON_H_PAD = 4; S32 BTN_HEIGHT_SMALL= 23; S32 BTN_HEIGHT = 23; +S32 BTN_DROP_SHADOW = 2; LLButton::Params::Params() : label_selected("label_selected"), // requires is_toggle true diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index ccd31e90c0..ab64440c19 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -43,10 +43,10 @@ // // PLEASE please use these "constants" when building your own buttons. -// They are loaded from settings.xml at run time. extern S32 LLBUTTON_H_PAD; extern S32 BTN_HEIGHT_SMALL; extern S32 BTN_HEIGHT; +extern S32 BTN_DROP_SHADOW; // // Helpful functions diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 9ca05a16f3..7a925c0659 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -482,8 +482,6 @@ void LLComboBox::onFocusLost() void LLComboBox::setButtonVisible(BOOL visible) { - static LLUICachedControl drop_shadow_button ("DropShadowButton", 0); - mButton->setVisible(visible); if (mTextEntry) { @@ -491,7 +489,7 @@ void LLComboBox::setButtonVisible(BOOL visible) if (visible) { S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0; - text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button; + text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * BTN_DROP_SHADOW; } //mTextEntry->setRect(text_entry_rect); mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE); @@ -530,19 +528,18 @@ void LLComboBox::setEnabledByValue(const LLSD& value, BOOL enabled) void LLComboBox::createLineEditor(const LLComboBox::Params& p) { - static LLUICachedControl drop_shadow_button ("DropShadowButton", 0); LLRect rect = getLocalRect(); if (mAllowTextEntry) { S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0; - S32 shadow_size = drop_shadow_button; + S32 shadow_size = BTN_DROP_SHADOW; mButton->setRect(LLRect( getRect().getWidth() - llmax(8,arrow_width) - 2 * shadow_size, rect.mTop, rect.mRight, rect.mBottom)); mButton->setTabStop(FALSE); mButton->setHAlign(LLFontGL::HCENTER); LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); - text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button; + text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * BTN_DROP_SHADOW; // clear label on button std::string cur_label = mButton->getLabelSelected(); LLLineEditor::Params params = p.combo_editor; @@ -1081,13 +1078,11 @@ void LLComboBox::onSetHighlight() const void LLComboBox::imageLoaded() { - static LLUICachedControl drop_shadow_button("DropShadowButton", 0); - if (mAllowTextEntry) { LLRect rect = getLocalRect(); S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0; - S32 shadow_size = drop_shadow_button; + S32 shadow_size = BTN_DROP_SHADOW; mButton->setRect(LLRect(getRect().getWidth() - llmax(8, arrow_width) - 2 * shadow_size, rect.mTop, rect.mRight, rect.mBottom)); if (mButton->getVisible()) @@ -1096,7 +1091,7 @@ void LLComboBox::imageLoaded() if (mTextEntry) { LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); - text_entry_rect.mRight -= llmax(8, arrow_width) + 2 * drop_shadow_button; + text_entry_rect.mRight -= llmax(8, arrow_width) + 2 * BTN_DROP_SHADOW; mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE); } } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 2303cd24b7..d08084cdf5 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1961,10 +1961,9 @@ void LLFloater::drawShadow(LLPanel* panel) S32 right = panel->getRect().getWidth() - LLPANEL_BORDER_WIDTH; S32 bottom = LLPANEL_BORDER_WIDTH; - static LLUICachedControl shadow_offset_S32 ("DropShadowFloater", 0); static LLUIColor shadow_color_cached = LLUIColorTable::instance().getColor("ColorDropShadow"); LLColor4 shadow_color = shadow_color_cached; - F32 shadow_offset = (F32)shadow_offset_S32; + F32 shadow_offset = (F32)DROP_SHADOW_FLOATER; if (!panel->isBackgroundOpaque()) { diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 5319af1b60..ed0e705fd5 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -596,15 +596,13 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) { - static LLCachedControl drag_and_drop_threshold(*LLUI::getInstance()->mSettingGroups["config"],"DragAndDropDistanceThreshold", 3); - mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); if( hasMouseCapture() && isMovable() ) { LLFolderView* root = getRoot(); - if( (x - mDragStartX) * (x - mDragStartX) + (y - mDragStartY) * (y - mDragStartY) > drag_and_drop_threshold() * drag_and_drop_threshold() + if( (x - mDragStartX) * (x - mDragStartX) + (y - mDragStartY) * (y - mDragStartY) > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD && root->getAllowDrag() && root->getCurSelectedItem() && root->startDrag()) diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 32c5ceb20e..fe25ac1647 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3220,10 +3220,9 @@ void LLMenuGL::draw( void ) } if (mDropShadowed && !mTornOff) { - static LLUICachedControl drop_shadow_floater ("DropShadowFloater", 0); static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow"); gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, - color_drop_shadow, drop_shadow_floater ); + color_drop_shadow, DROP_SHADOW_FLOATER); } if( mBgVisible ) diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 3e5978eb59..22d98469ec 100644 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -284,10 +284,9 @@ BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask ) void LLModalDialog::draw() { static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow"); - static LLUICachedControl shadow_lines ("DropShadowFloater", 0); gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0, - shadow_color, shadow_lines); + shadow_color, DROP_SHADOW_FLOATER); LLFloater::draw(); diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index 2707f7a15c..58ecf3e603 100644 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -1134,8 +1134,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); - static LLCachedControl drag_threshold(*LLUI::getInstance()->mSettingGroups["config"], "DragAndDropDistanceThreshold", 3); - if (mouse_distance_squared > drag_threshold * drag_threshold + if (mouse_distance_squared > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD && hasMouseCapture() && mStartDragItemCallback && mHandleDragItemCallback) { diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 30dbd7248f..868e1d21a6 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -53,7 +53,7 @@ class LLWindow; class LLView; class LLHelp; - +const S32 DRAG_N_DROP_DISTANCE_THRESHOLD = 3; // this enum is used by the llview.h (viewer) and the llassetstorage.h (viewer and sim) enum EDragAndDropType { diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 67dd24341c..424b4879ce 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -41,6 +41,7 @@ const BOOL TAKE_FOCUS_YES = TRUE; const BOOL TAKE_FOCUS_NO = FALSE; +const S32 DROP_SHADOW_FLOATER = 5; class LLUICtrl : public LLView, public boost::signals2::trackable diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7a8c1abd7a..654ab76b30 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2029,17 +2029,6 @@ Value 1 - DebugInventoryFilters - - Comment - Turn on debugging display for inventory filtering - Persist - 1 - Type - Boolean - Value - 0 - DebugPermissions Comment @@ -2152,454 +2141,25 @@ DebugShowUploadCost - Comment - Show mesh upload cost - Persist - 1 - Type - Boolean - Value - 1 - - DebugShowXUINames - - Comment - Show tooltips with XUI path to widget - Persist - 0 - Type - Boolean - Value - 0 - - DebugSlshareLogTag - - Comment - Request slshare-service debug logging - Persist - 0 - Type - String - Value - - - DebugStatModeFPS - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeBandwidth - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModePacketLoss - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatMode - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeKTrisDrawnFr - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeKTrisDrawnSec - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeTotalObjs - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeNewObjs - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeTextureCount - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeRawCount - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeGLMem - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeFormattedMem - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeRawMem - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeBoundMem - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModePacketsIn - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModePacketsOut - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeObjects - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeTexture - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeAsset - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeLayers - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeActualIn - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeActualOut - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeTimeDialation - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimFPS - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModePhysicsFPS - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModePinnedObjects - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeLowLODObjects - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeMemoryAllocated - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeAgentUpdatesSec - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeMainAgents - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeChildAgents - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimObjects - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimActiveObjects - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimActiveScripts - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimScriptEvents - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimInPPS - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimOutPPS - - Comment - Mode of stat in Statistics floater - Persist - 1 - Type - S32 - Value - -1 - - DebugStatModeSimPendingDownloads + Comment + Show mesh upload cost + Persist + 1 + Type + Boolean + Value + 1 + + DebugShowXUINames Comment - Mode of stat in Statistics floater + Show tooltips with XUI path to widget Persist - 1 + 0 Type - S32 + Boolean Value - -1 + 0 SimPendingUploads @@ -2788,17 +2348,6 @@ Value 0 - DefaultBlankNormalTexture - - Comment - Texture used as 'Blank' in texture picker for normal maps. (UUID texture reference) - Persist - 1 - Type - String - Value - 5b53359e-59dd-d8a2-04c3-9e65134da47a - DefaultFemaleAvatar Comment @@ -2832,28 +2381,6 @@ Value Male Shape & Outfit - DefaultObjectNormalTexture - - Comment - Texture used as 'Default' in texture picker for normal map. (UUID texture reference) - Persist - 1 - Type - String - Value - 85f28839-7a1c-b4e3-d71d-967792970a7b - - DefaultObjectSpecularTexture - - Comment - Texture used as 'Default' in texture picker for specular map. (UUID texture reference) - Persist - 1 - Type - String - Value - 87e0e8f7-8729-1ea8-cfc9-8915773009db - DefaultObjectTexture Comment @@ -2865,17 +2392,6 @@ Value 89556747-24cb-43ed-920b-47caed15465f - DefaultUploadCost - - Comment - Default sound/image/file upload cost(in case economy data is not available). - Persist - 1 - Type - U32 - Value - 10 - DestinationGuideURL Comment @@ -2986,83 +2502,6 @@ Value 1 - DisplayAvatarAgentTarget - - Comment - Show avatar positioning locators (animation debug) - Persist - 1 - Type - Boolean - Value - 0 - - DisplayChat - - Comment - Display Latest Chat message on LCD - Persist - 1 - Type - Boolean - Value - 1 - - DisplayDebug - - Comment - Display Network Information on LCD - Persist - 1 - Type - Boolean - Value - 1 - - DisplayDebugConsole - - Comment - Display Console Debug Information on LCD - Persist - 1 - Type - Boolean - Value - 1 - - DisplayIM - - Comment - Display Latest IM message on LCD - Persist - 1 - Type - Boolean - Value - 1 - - DisplayLinden - - Comment - Display Account Information on LCD - Persist - 1 - Type - Boolean - Value - 1 - - DisplayRegion - - Comment - Display Location information on LCD - Persist - 1 - Type - Boolean - Value - 1 - DisplayTimecode Comment @@ -3129,72 +2568,6 @@ Value 1 - DragAndDropToolTipDelay - - Comment - Seconds before displaying tooltip when performing drag and drop operation - Persist - 1 - Type - F32 - Value - 0.10000000149 - - DragAndDropDistanceThreshold - - Comment - Number of pixels that mouse should move before triggering drag and drop mode - Persist - 1 - Type - S32 - Value - 3 - - DropShadowButton - - Comment - Drop shadow width for buttons (pixels) - Persist - 1 - Type - S32 - Value - 2 - - DropShadowFloater - - Comment - Drop shadow width for floaters (pixels) - Persist - 1 - Type - S32 - Value - 5 - - DropShadowSlider - - Comment - Drop shadow width for sliders (pixels) - Persist - 1 - Type - S32 - Value - 3 - - DropShadowTooltip - - Comment - Drop shadow width for tooltips (pixels) - Persist - 1 - Type - S32 - Value - 4 - DynamicCameraStrength Comment @@ -12822,17 +12195,6 @@ Value 5748decc-f629-461c-9a36-a35a221fe21f - UIImgWhiteUUID - - Comment - - Persist - 0 - Type - String - Value - 5748decc-f629-461c-9a36-a35a221fe21f - UILineEditorCursorThickness Comment @@ -13636,17 +12998,6 @@ Value 1 - UseEnvironmentFromRegion - - Comment - Choose whether to use the region's environment settings, or override them with the local settings. - Persist - 1 - Type - Boolean - Value - 1 - EnvironmentPersistAcrossLogin Comment @@ -13658,62 +13009,6 @@ Value 0 - UseDayCycle - - Comment - Whether to use use a day cycle or a fixed sky. - Persist - 1 - Type - Boolean - Value - 1 - - WaterPresetName - - Comment - Water preset to use. May be superseded by region settings. - Persist - 1 - Type - String - Value - Default - - SkyPresetName - - Comment - Sky preset to use. May be superseded by region settings or by a day cycle (see DayCycleName). - Persist - 1 - Type - String - Value - Default - - DayCycleName - - Comment - Day cycle to use. May be superseded by region settings. - Persist - 1 - Type - String - Value - Default - - UseExternalBrowser - - - Comment - (Deprecated) Use default browser when opening web pages instead of in-world browser. - Persist - 1 - Type - Boolean - Value - 1 - PreferredBrowserBehavior Comment @@ -14976,28 +14271,6 @@ Value 120.0 - DestinationGuideHintTimeout - - Comment - Number of seconds to wait before telling resident about destination guide. - Persist - 1 - Type - F32 - Value - 1200.0 - - SidePanelHintTimeout - - Comment - Number of seconds to wait before telling resident about side panel. - Persist - 1 - Type - F32 - Value - 300.0 - GroupMembersSortOrder Comment @@ -16065,17 +15338,6 @@ Value 7000 - DisablePrecacheDelayAfterTeleporting - - Comment - Disables the artificial delay in the viewer that precaches some incoming assets - Persist - 0 - Type - Boolean - Value - 0 - VersionChannelName Comment diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index d2fe570069..adea8a2bb4 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -1919,7 +1919,8 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) } else { - target_lag = vel * gSavedSettings.getF32("DynamicCameraStrength") / 30.f; + LLCachedControl dynamic_camera_strength(gSavedSettings, "DynamicCameraStrength"); + target_lag = vel * dynamic_camera_strength / 30.f; } mCameraLag = lerp(mCameraLag, target_lag, lag_interp); diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index 95d6a2d652..0b270103cc 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -114,7 +114,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild() getChild(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE); getChild(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId()); - getChild(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture"))); + getChild(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(DEFAULT_BLANK_NORMAL_TEXTURE); getChild(FIELD_WATER_NORMAL_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onWaterMapChanged(); }); refresh(); diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index d6f3068610..d84b6990b9 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -230,10 +230,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) // Can't access old mTextEntry fields as they are protected, so lets build new params // That is C&P from LLComboBox::createLineEditor function - static LLUICachedControl drop_shadow_button ("DropShadowButton", 0); S32 arrow_width = mArrowImage ? mArrowImage->getWidth() : 0; LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); - text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * drop_shadow_button; + text_entry_rect.mRight -= llmax(8,arrow_width) + 2 * BTN_DROP_SHADOW; LLLineEditor::Params params = p.combo_editor; params.rect(text_entry_rect); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index f5ee1171d9..61448828d1 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -352,10 +352,9 @@ void LLNavigationBar::draw() { if (isBackgroundVisible()) { - static LLUICachedControl drop_shadow_floater ("DropShadowFloater", 0); static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow"); gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, - color_drop_shadow, drop_shadow_floater ); + color_drop_shadow, DROP_SHADOW_FLOATER); } LLPanel::draw(); diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp index a09964e17d..fc9ca4e47e 100644 --- a/indra/newview/llpaneleditwater.cpp +++ b/indra/newview/llpaneleditwater.cpp @@ -89,7 +89,7 @@ BOOL LLPanelSettingsWaterMainTab::postBuild() getChild(FIELD_WATER_UNDERWATER_MOD)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogUnderWaterChanged(); }); mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId()); - mTxtNormalMap->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" ))); + mTxtNormalMap->setBlankImageAssetID(DEFAULT_BLANK_NORMAL_TEXTURE); mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); }); getChild(FIELD_WATER_WAVE2_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); }); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index cbb87f63bb..eb392b3032 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -190,7 +190,7 @@ BOOL LLPanelFace::postBuild() mTextureCtrl = getChild("texture control"); if(mTextureCtrl) { - mTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" ))); + mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE); mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) ); mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) ); mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) ); @@ -207,7 +207,7 @@ BOOL LLPanelFace::postBuild() mShinyTextureCtrl = getChild("shinytexture control"); if(mShinyTextureCtrl) { - mShinyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectSpecularTexture" ))); + mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR_TEXTURE); mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) ); mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) ); mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) ); @@ -224,8 +224,8 @@ BOOL LLPanelFace::postBuild() mBumpyTextureCtrl = getChild("bumpytexture control"); if(mBumpyTextureCtrl) { - mBumpyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectNormalTexture" ))); - mBumpyTextureCtrl->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" ))); + mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL_TEXTURE); + mBumpyTextureCtrl->setBlankImageAssetID(DEFAULT_BLANK_NORMAL_TEXTURE); mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) ); mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) ); mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) ); @@ -3797,7 +3797,7 @@ void LLPanelFace::onCopyTexture() LLUUID id = mat_data["NormMap"].asUUID(); if (id.notNull() && !get_can_copy_texture(id)) { - mat_data["NormMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture")); + mat_data["NormMap"] = DEFAULT_OBJECT_TEXTURE; mat_data["NormMapNoCopy"] = true; } @@ -3807,7 +3807,7 @@ void LLPanelFace::onCopyTexture() LLUUID id = mat_data["SpecMap"].asUUID(); if (id.notNull() && !get_can_copy_texture(id)) { - mat_data["SpecMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture")); + mat_data["SpecMap"] = DEFAULT_OBJECT_TEXTURE; mat_data["SpecMapNoCopy"] = true; } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 2da431955f..c8256640f2 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -244,7 +244,7 @@ BOOL LLPanelObject::postBuild() mCtrlSculptTexture = getChild("sculpt texture control"); if (mCtrlSculptTexture) { - mCtrlSculptTexture->setDefaultImageAssetID(LLUUID(SCULPT_DEFAULT_TEXTURE)); + mCtrlSculptTexture->setDefaultImageAssetID(SCULPT_DEFAULT_TEXTURE); mCtrlSculptTexture->setCommitCallback( boost::bind(&LLPanelObject::onCommitSculpt, this, _2 )); mCtrlSculptTexture->setOnCancelCallback( boost::bind(&LLPanelObject::onCancelSculpt, this, _2 )); mCtrlSculptTexture->setOnSelectCallback( boost::bind(&LLPanelObject::onSelectSculpt, this, _2 )); @@ -2026,7 +2026,7 @@ void LLPanelObject::onCancelSculpt(const LLSD& data) if(mSculptTextureRevert == LLUUID::null) { - mSculptTextureRevert = LLUUID(SCULPT_DEFAULT_TEXTURE); + mSculptTextureRevert = SCULPT_DEFAULT_TEXTURE; } mTextureCtrl->setImageAssetID(mSculptTextureRevert); @@ -2269,7 +2269,7 @@ void LLPanelObject::onCopyParams() } else { - mClipboardParams["sculpt"]["id"] = LLUUID(SCULPT_DEFAULT_TEXTURE); + mClipboardParams["sculpt"]["id"] = SCULPT_DEFAULT_TEXTURE; } mClipboardParams["sculpt"]["type"] = sculpt_params->getSculptType(); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 0ce82a1297..0a95f58c4d 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -86,10 +86,10 @@ static const S32 LOCAL_TRACKING_ID_COLUMN = 1; //static bool get_is_predefined_texture(LLUUID asset_id) { - if (asset_id == LLUUID(gSavedSettings.getString("DefaultObjectTexture")) - || asset_id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID")) - || asset_id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID")) - || asset_id == LLUUID(SCULPT_DEFAULT_TEXTURE)) + if (asset_id == DEFAULT_OBJECT_TEXTURE + || asset_id == UI_IMAGE_WHITE + || asset_id == UI_IMAGE_INVISIBLE + || asset_id == SCULPT_DEFAULT_TEXTURE) { return true; } @@ -1225,8 +1225,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) // Default of defaults is white image for diff tex // - LLUUID whiteImage( gSavedSettings.getString( "UIImgWhiteUUID" ) ); - setBlankImageAssetID( whiteImage ); + setBlankImageAssetID(UI_IMAGE_WHITE); setAllowNoTexture(p.allow_no_texture); setCanApplyImmediately(p.can_apply_immediately); diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index fbb38c4464..a3952a62d6 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -63,6 +63,13 @@ bool get_is_predefined_texture(LLUUID asset_id); LLUUID get_copy_free_item_by_asset_id(LLUUID image_id, bool no_trans_perm = false); bool get_can_copy_texture(LLUUID image_id); +const LLUUID DEFAULT_BLANK_NORMAL_TEXTURE("5b53359e-59dd-d8a2-04c3-9e65134da47a"); +const LLUUID DEFAULT_OBJECT_NORMAL_TEXTURE("85f28839-7a1c-b4e3-d71d-967792970a7b"); +const LLUUID DEFAULT_OBJECT_SPECULAR_TEXTURE("87e0e8f7-8729-1ea8-cfc9-8915773009db"); +const LLUUID DEFAULT_OBJECT_TEXTURE("89556747-24cb-43ed-920b-47caed15465f"); +const LLUUID UI_IMAGE_WHITE("5748decc-f629-461c-9a36-a35a221fe21f"); +const LLUUID UI_IMAGE_INVISIBLE("89556747-24cb-43ed-920b-47caed15465f"); + ////////////////////////////////////////////////////////////////////////////////////////// // LLTextureCtrl diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 692e8d91a9..7e68995a02 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -492,10 +492,9 @@ void LLToastAlertPanel::draw() } static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow"); - static LLUICachedControl shadow_lines ("DropShadowFloater", 5); gl_drop_shadow( 0, LLToastPanel::getRect().getHeight(), LLToastPanel::getRect().getWidth(), 0, - shadow_color, shadow_lines); + shadow_color, DROP_SHADOW_FLOATER); LLToastPanel::draw(); } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index b16b26b96e..17bb316190 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -298,12 +298,10 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y) BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) { - static LLCachedControl drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold", 3); - S32 mouse_delta_x = x - mDragStartX; S32 mouse_delta_y = y - mDragStartY; - return (mouse_delta_x * mouse_delta_x) + (mouse_delta_y * mouse_delta_y) > drag_and_drop_threshold * drag_and_drop_threshold; + return (mouse_delta_x * mouse_delta_x) + (mouse_delta_y * mouse_delta_y) > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD; } void LLToolDragAndDrop::beginDrag(EDragAndDropType type, @@ -566,12 +564,13 @@ BOOL LLToolDragAndDrop::handleKey(KEY key, MASK mask) BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask) { + const F32 DRAG_N_DROP_TOOLTIP_DELAY = 0.10000000149f; if (!mToolTipMsg.empty()) { LLToolTipMgr::instance().unblockToolTips(); LLToolTipMgr::instance().show(LLToolTip::Params() .message(mToolTipMsg) - .delay_time(gSavedSettings.getF32( "DragAndDropToolTipDelay" ))); + .delay_time(DRAG_N_DROP_TOOLTIP_DELAY)); return TRUE; } return FALSE; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 17a7ad9d01..d41003ea6e 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -765,8 +765,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) { S32 delta_x = x - mMouseDownX; S32 delta_y = y - mMouseDownY; - S32 threshold = gSavedSettings.getS32("DragAndDropDistanceThreshold"); - if (delta_x * delta_x + delta_y * delta_y > threshold * threshold) + if (delta_x * delta_x + delta_y * delta_y > DRAG_N_DROP_DISTANCE_THRESHOLD * DRAG_N_DROP_DISTANCE_THRESHOLD) { startCameraSteering(); steerCameraWithMouse(x, y); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9384f36fd2..d68d0cd92c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3372,11 +3372,13 @@ void LLViewerWindow::updateUI() if (gLoggedInTime.getStarted()) { - if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("DestinationGuideHintTimeout")) + const F32 DESTINATION_GUIDE_HINT_TIMEOUT = 1200.f; + const F32 SIDE_PANEL_HINT_TIMEOUT = 300.f; + if (gLoggedInTime.getElapsedTimeF32() > DESTINATION_GUIDE_HINT_TIMEOUT) { LLFirstUse::notUsingDestinationGuide(); } - if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("SidePanelHintTimeout")) + if (gLoggedInTime.getElapsedTimeF32() > SIDE_PANEL_HINT_TIMEOUT) { LLFirstUse::notUsingSidePanel(); } diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml index ce788654aa..19b3c3160c 100644 --- a/indra/newview/skins/default/xui/en/floater_media_browser.xml +++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml @@ -211,22 +211,12 @@ -