From 3eccadb68101b76eaacdfecd93b69c3c38cf2293 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 17 Aug 2017 09:14:32 -0300 Subject: [PATCH] Update preview window theme correctly when it's hidden --- src/app/ui/main_window.cpp | 7 +++++++ src/app/ui/main_window.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/ui/main_window.cpp b/src/app/ui/main_window.cpp index c71cfcefc..1f7426018 100644 --- a/src/app/ui/main_window.cpp +++ b/src/app/ui/main_window.cpp @@ -322,6 +322,13 @@ bool MainWindow::onProcessMessage(ui::Message* msg) return Window::onProcessMessage(msg); } +void MainWindow::onInitTheme(ui::InitThemeEvent& ev) +{ + app::gen::MainWindow::onInitTheme(ev); + if (m_previewEditor) + m_previewEditor->initTheme(); +} + void MainWindow::onSaveLayout(SaveLayoutEvent& ev) { // Invert the timeline splitter position before we save the setting. diff --git a/src/app/ui/main_window.h b/src/app/ui/main_window.h index a3ef38e6b..53838e056 100644 --- a/src/app/ui/main_window.h +++ b/src/app/ui/main_window.h @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2001-2016 David Capello +// Copyright (C) 2001-2017 David Capello // // This program is distributed under the terms of // the End-User License Agreement for Aseprite. @@ -96,6 +96,7 @@ namespace app { protected: bool onProcessMessage(ui::Message* msg) override; + void onInitTheme(ui::InitThemeEvent& ev) override; void onSaveLayout(ui::SaveLayoutEvent& ev) override; void onResize(ui::ResizeEvent& ev) override; void onActiveViewChange();