diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2012-06-07 05:47:50 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2012-06-07 05:47:50 -0400 |
commit | ce563795e1f5d7493b975393bea9ec5cab90fd6a (patch) | |
tree | edc0b403ee80989bfa55b6d1cae3680093fb61fc /indra/newview/llfloaterhardwaresettings.cpp | |
parent | d167ebe35f8cdec1ca88e0d817e2878f14a5aa68 (diff) | |
parent | 89ea7ccfc7fd4c33eab4ad9123141fa40231a00d (diff) |
MAINT-1144: Merge llhttpclient_test.cpp fix back to tip
Diffstat (limited to 'indra/newview/llfloaterhardwaresettings.cpp')
-rw-r--r-- | indra/newview/llfloaterhardwaresettings.cpp | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 42ec7d765b..f9a403cf9f 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -34,7 +34,9 @@ #include "llviewercontrol.h" #include "llviewertexturelist.h" #include "llfeaturemanager.h" +#include "llspinctrl.h" #include "llstartup.h" +#include "lltextbox.h" #include "pipeline.h" // Linden library includes @@ -98,18 +100,40 @@ void LLFloaterHardwareSettings::refreshEnabledState() } // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance - getChildView("gamma")->setEnabled(!gPipeline.canUseWindLightShaders()); + LLSpinCtrl* gamma_ctrl = getChild<LLSpinCtrl>("gamma"); + gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders()); - getChildView("fsaa")->setEnabled(gPipeline.canUseAntiAliasing()); - getChildView("antialiasing restart")->setVisible(!gSavedSettings.getBOOL("RenderDeferred")); - /* Enable to reset fsaa value to disabled when feature is not available. - if (!gPipeline.canUseAntiAliasing()) + // anti-aliasing { - getChild<LLUICtrl>("fsaa")->setValue((LLSD::Integer) 0); + LLUICtrl* fsaa_ctrl = getChild<LLUICtrl>("fsaa"); + LLTextBox* fsaa_text = getChild<LLTextBox>("antialiasing label"); + LLView* fsaa_restart = getChildView("antialiasing restart"); + + // Enable or disable the control, the "Antialiasing:" label and the restart warning + // based on code support for the feature on the current hardware. + + if (gPipeline.canUseAntiAliasing()) + { + fsaa_ctrl->setEnabled(TRUE); + + // borrow the text color from the gamma control for consistency + fsaa_text->setColor(gamma_ctrl->getEnabledTextColor()); + + fsaa_restart->setVisible(!gSavedSettings.getBOOL("RenderDeferred")); + } + else + { + fsaa_ctrl->setEnabled(FALSE); + fsaa_ctrl->setValue((LLSD::Integer) 0); + + // borrow the text color from the gamma control for consistency + fsaa_text->setColor(gamma_ctrl->getDisabledTextColor()); + + fsaa_restart->setVisible(FALSE); + } } - */ } //============================================================================ |