summaryrefslogtreecommitdiff
path: root/plugins
diff options
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2016-07-05 10:22:42 +0000
committerBileto Bot <ci-train-bot@canonical.com>2016-07-05 10:22:42 +0000
commit7dedd5d3e0120e597165786acf82bbed9a8ae0e7 (patch)
tree625a08ab9d3a26763d71dc1d41438ab7953fe255 /plugins
parent8913b1a2c84e6af1cf84191a2d75f88c64e6ca09 (diff)
parenta56241fbd352615c7e8c5d5e3d93c7ee39cfa6b0 (diff)
Views: Toggle animators durations based on low-gfx setting
Disable animations based on low_gfx setting (now ported to nux::Property) (LP: #1598770) (bzr r4143)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/unityshell/src/UnityShowdesktopHandler.cpp6
-rw-r--r--plugins/unityshell/src/unityshell.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/unityshell/src/UnityShowdesktopHandler.cpp b/plugins/unityshell/src/UnityShowdesktopHandler.cpp
index d79200e0f..5ef286cac 100644
--- a/plugins/unityshell/src/UnityShowdesktopHandler.cpp
+++ b/plugins/unityshell/src/UnityShowdesktopHandler.cpp
@@ -100,7 +100,7 @@ void ShowdesktopHandler::FadeOut()
return;
state_ = ShowdesktopHandler::StateFadeOut;
- progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : 0.0f;
+ progress_ = Settings::Instance().low_gfx() ? 1.0f : 0.0f;
was_hidden_ = showdesktop_handler_window_interface_->Hidden();
@@ -144,7 +144,7 @@ ShowdesktopHandlerWindowInterface::PostPaintAction ShowdesktopHandler::Animate (
if (state_ == ShowdesktopHandler::StateFadeOut)
{
- progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : progress_ + inc;
+ progress_ = Settings::Instance().low_gfx() ? 1.0f : progress_ + inc;
if (progress_ >= 1.0f)
{
progress_ = 1.0f;
@@ -153,7 +153,7 @@ ShowdesktopHandlerWindowInterface::PostPaintAction ShowdesktopHandler::Animate (
}
else if (state_ == StateFadeIn)
{
- progress_ = unity::Settings::Instance().GetLowGfxMode() ? 0.0f : progress_ - inc;
+ progress_ = Settings::Instance().low_gfx() ? 0.0f : progress_ - inc;
if (progress_ <= 0.0f)
{
progress_ = 0.0f;
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 848981202..eae3e412a 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -301,12 +301,12 @@ UnityScreen::UnityScreen(CompScreen* screen)
(getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 1) ||
optionGetLowGraphicsMode())
{
- unity_settings_.SetLowGfxMode(true);
+ unity_settings_.low_gfx = true;
}
if (getenv("UNITY_LOW_GFX_MODE") != NULL && atoi(getenv("UNITY_LOW_GFX_MODE")) == 0)
{
- unity_settings_.SetLowGfxMode(false);
+ unity_settings_.low_gfx = false;
}
#endif
@@ -3727,7 +3727,7 @@ void UnityScreen::optionChanged(CompOption* opt, UnityshellOptions::Options num)
else
BackgroundEffectHelper::blur_type = (unity::BlurType)optionGetDashBlurExperimental();
- unity::Settings::Instance().SetLowGfxMode(optionGetLowGraphicsMode());
+ unity::Settings::Instance().low_gfx = optionGetLowGraphicsMode();
break;
case UnityshellOptions::DecayRate:
launcher_options->edge_decay_rate = optionGetDecayRate() * 100;