summaryrefslogtreecommitdiff
path: root/unity-shared
diff options
authorChris Townsend <christopher.townsend@canonical.com>2015-05-12 13:09:57 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-05-12 13:09:57 +0000
commit020bf5ac79b9dae0277e41ce8446c7ebf69e5794 (patch)
tree7b917eefb712517e51741f0964b67e5893c73ead /unity-shared
parentfa8be9fa64617ab3b8bfab36e118eb17dc49c889 (diff)
parentc25dd27d6341f2117bb3b41549c9204b486519d3 (diff)
Add option to enable and disable Unity low graphics mode on the fly in ccsm or via gsettings. Fixes: #1412937
Approved by: Marco Trevisan (TreviƱo) (bzr r3962)
Diffstat (limited to 'unity-shared')
-rw-r--r--unity-shared/OverlayRenderer.cpp2
-rw-r--r--unity-shared/UnitySettings.cpp7
-rw-r--r--unity-shared/UnitySettings.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp
index 745bfae9e..7f84f6fc0 100644
--- a/unity-shared/OverlayRenderer.cpp
+++ b/unity-shared/OverlayRenderer.cpp
@@ -116,6 +116,8 @@ OverlayRendererImpl::OverlayRendererImpl(OverlayRenderer *parent_)
{
parent->scale = Settings::Instance().em()->DPIScale();
parent->scale.changed.connect(sigc::hide(sigc::mem_fun(this, &OverlayRendererImpl::LoadScaledTextures)));
+ Settings::Instance().low_gfx_changed.connect(sigc::mem_fun(this, &OverlayRendererImpl::UpdateTextures));
+
UpdateTextures();
LoadScaledTextures();
}
diff --git a/unity-shared/UnitySettings.cpp b/unity-shared/UnitySettings.cpp
index 701e23269..d7a0e282d 100644
--- a/unity-shared/UnitySettings.cpp
+++ b/unity-shared/UnitySettings.cpp
@@ -373,7 +373,12 @@ bool Settings::GetLowGfxMode() const
void Settings::SetLowGfxMode(const bool low_gfx)
{
- pimpl->lowGfx_ = low_gfx;
+ if (pimpl->lowGfx_ != low_gfx)
+ {
+ pimpl->lowGfx_ = low_gfx;
+
+ low_gfx_changed.emit();
+ }
}
EMConverter::Ptr const& Settings::em(int monitor) const
diff --git a/unity-shared/UnitySettings.h b/unity-shared/UnitySettings.h
index 261dbedce..4e16286b7 100644
--- a/unity-shared/UnitySettings.h
+++ b/unity-shared/UnitySettings.h
@@ -58,6 +58,7 @@ public:
nux::Property<double> font_scaling;
sigc::signal<void> dpi_changed;
+ sigc::signal<void> low_gfx_changed;
private:
class Impl;