diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2016-03-31 07:53:46 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2016-03-31 07:53:46 +0200 |
| commit | d3441c96bb7111745d9832dbda38390e84cdee5c (patch) | |
| tree | e616a0e091cd5f832a93e02fa78f81e732ec4d21 | |
| parent | c8dbec6acd34754a24b0e336fda693c6acdc48fa (diff) | |
BackgroundEffectHelper: reload textures on chache themed icons invalidated
(bzr r4093.2.26)
| -rw-r--r-- | unity-shared/BackgroundEffectHelper.cpp | 7 | ||||
| -rw-r--r-- | unity-shared/BackgroundEffectHelper.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/unity-shared/BackgroundEffectHelper.cpp b/unity-shared/BackgroundEffectHelper.cpp index 4affca9a0..66f15a82b 100644 --- a/unity-shared/BackgroundEffectHelper.cpp +++ b/unity-shared/BackgroundEffectHelper.cpp @@ -48,7 +48,7 @@ BackgroundEffectHelper::BackgroundEffectHelper(nux::View* view) { enabled.changed.connect(sigc::mem_fun(this, &BackgroundEffectHelper::OnEnabledChanged)); owner.changed.connect(sigc::mem_fun(this, &BackgroundEffectHelper::OnOwnerChanged)); - noise_texture_ = TextureCache::GetDefault().FindTexture("dash_noise"); + TextureCache::GetDefault().themed_invalidated.connect(sigc::mem_fun(this, &BackgroundEffectHelper::LoadTextures)); if (Settings::Instance().GetLowGfxMode()) blur_type = BLUR_NONE; @@ -63,6 +63,11 @@ BackgroundEffectHelper::~BackgroundEffectHelper() Unregister(this); } +void BackgroundEffectHelper::LoadTextures() +{ + noise_texture_ = TextureCache::GetDefault().FindTexture("dash_noise"); +} + void BackgroundEffectHelper::OnEnabledChanged(bool enabled) { if (enabled) diff --git a/unity-shared/BackgroundEffectHelper.h b/unity-shared/BackgroundEffectHelper.h index 6f6a5a441..85445e88b 100644 --- a/unity-shared/BackgroundEffectHelper.h +++ b/unity-shared/BackgroundEffectHelper.h @@ -78,6 +78,7 @@ private: void OnEnabledChanged(bool value); void OnOwnerChanged(nux::View*); void SetupOwner(nux::View*); + void LoadTextures(); bool UpdateOwnerGeometry(); nux::ObjectPtr<nux::BaseTexture> noise_texture_; |
