diff options
| -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_; |
