From e61d7ac0098d89cc6b124dda2e040120c01d2bee Mon Sep 17 00:00:00 2001
From: andreykproductengine <andreykproductengine@lindenlab.com>
Date: Tue, 10 Jul 2018 17:09:47 +0300
Subject: [PATCH] MAINT-8833 EEP UI should be either responsive or indicate
 that it is disabled.

---
 indra/llui/llslider.cpp                       |   5 ++-
 indra/newview/llfloatereditextdaycycle.cpp    |   1 -
 indra/newview/llpaneleditsky.cpp              |  35 ++++++++++++++++++
 indra/newview/llpaneleditsky.h                |   3 ++
 indra/newview/llpaneleditwater.cpp            |  18 +++++++++
 indra/newview/llpaneleditwater.h              |   1 +
 .../textures/widgets/SliderThumb_Disabled.png | Bin 475 -> 429 bytes
 7 files changed, 60 insertions(+), 3 deletions(-)

diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp
index ebbb951ee63..6925c0a130e 100644
--- a/indra/llui/llslider.cpp
+++ b/indra/llui/llslider.cpp
@@ -331,8 +331,9 @@ void LLSlider::draw()
 		highlight_rect.set(track_rect.mLeft, track_rect.mTop, track_rect.mRight, track_rect.mBottom);
 	}
 
-	trackImage->draw(track_rect, LLColor4::white % alpha);
-	trackHighlightImage->draw(highlight_rect, LLColor4::white % alpha);
+	LLColor4 color = isInEnabledChain() ? LLColor4::white % alpha : LLColor4::white % (0.6f * alpha);
+	trackImage->draw(track_rect, color);
+	trackHighlightImage->draw(highlight_rect, color);
 
 	// Thumb
 	if (hasFocus())
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index ba524c4dc56..295788a03a5 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -964,7 +964,6 @@ void LLFloaterEditExtDayCycle::setTabsData(LLTabContainer * tabcontainer, const
         {
             panel->setSettings(settings);
             panel->setEnabled(editable);
-            panel->refresh();
             panel->setAllChildrenEnabled(editable);
         }
     }
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 3c976c299e5..41d351b4812 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -112,6 +112,18 @@ BOOL LLPanelSettingsSkyAtmosTab::postBuild()
     return TRUE;
 }
 
+//virtual
+void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled)
+{
+    LLPanelSettingsSky::setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_HAZE_HORIZON)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_HAZE_DENSITY)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_SCENE_GAMMA)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_DENSITY_MULTIP)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_DISTANCE_MULTIP)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_MAX_ALT)->setEnabled(enabled);
+}
+
 void LLPanelSettingsSkyAtmosTab::refresh()
 {
     if (!mSkySettings)
@@ -211,6 +223,20 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild()
     return TRUE;
 }
 
+//virtual
+void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled)
+{
+    LLPanelSettingsSky::setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_X)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_Y)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_CLOUD_DETAIL_D)->setEnabled(enabled);
+}
+
 void LLPanelSettingsSkyCloudTab::refresh()
 {
     if (!mSkySettings)
@@ -315,6 +341,15 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild()
     return TRUE;
 }
 
+//virtual
+void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled)
+{
+    LLPanelSettingsSky::setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setEnabled(enabled);
+}
+
 void LLPanelSettingsSkySunMoonTab::refresh()
 {
     if (!mSkySettings)
diff --git a/indra/newview/llpaneleditsky.h b/indra/newview/llpaneleditsky.h
index 56ae9dc7bb1..30ab22147f5 100644
--- a/indra/newview/llpaneleditsky.h
+++ b/indra/newview/llpaneleditsky.h
@@ -62,6 +62,7 @@ class LLPanelSettingsSkyAtmosTab : public LLPanelSettingsSky
                             LLPanelSettingsSkyAtmosTab();
 
     virtual BOOL	        postBuild() override;
+    virtual void	        setEnabled(BOOL enabled);
 
 protected:
     virtual void            refresh() override;
@@ -86,6 +87,7 @@ class LLPanelSettingsSkyCloudTab : public LLPanelSettingsSky
                             LLPanelSettingsSkyCloudTab();
 
     virtual BOOL	        postBuild() override;
+    virtual void	        setEnabled(BOOL enabled);
 
 protected:
     virtual void            refresh() override;
@@ -108,6 +110,7 @@ class LLPanelSettingsSkySunMoonTab : public LLPanelSettingsSky
                             LLPanelSettingsSkySunMoonTab();
 
     virtual BOOL	        postBuild() override;
+    virtual void	        setEnabled(BOOL enabled);
 
 protected:
     virtual void            refresh() override;
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index 21b2868e7bf..9d9a183ffd1 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -107,6 +107,24 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
     return TRUE;
 }
 
+//virtual
+void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled)
+{
+    LLPanelSettingsWater::setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_FRESNEL_SCALE)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_FRESNEL_OFFSET)->setEnabled(enabled);
+
+    getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Z)->setEnabled(enabled);
+
+    getChild<LLUICtrl>(FIELD_WATER_SCALE_ABOVE)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_SCALE_BELOW)->setEnabled(enabled);
+    getChild<LLUICtrl>(FIELD_WATER_BLUR_MULTIP)->setEnabled(enabled);
+}
+
 //==========================================================================
 void LLPanelSettingsWaterMainTab::refresh()
 {
diff --git a/indra/newview/llpaneleditwater.h b/indra/newview/llpaneleditwater.h
index 1b70bf265cb..044e8e2b809 100644
--- a/indra/newview/llpaneleditwater.h
+++ b/indra/newview/llpaneleditwater.h
@@ -66,6 +66,7 @@ class LLPanelSettingsWaterMainTab : public LLPanelSettingsWater
                             LLPanelSettingsWaterMainTab();
 
     virtual BOOL	        postBuild() override;
+    virtual void	        setEnabled(BOOL enabled);
 
 protected:
     virtual void            refresh() override;
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png
index b62723201284662c61736fbf853c3d83a319c818..8888e134d17dfffcbc4b2cf48cb0b4a247842b79 100644
GIT binary patch
delta 403
zcmV;E0c`%;1F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