From 9b1300212a46e627f6035af561d953ff4349485a Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 5 Feb 2018 21:33:22 +0100 Subject: [PATCH] Fixes #266 graphical gliches after changing theme color --- src/widgets/basewindow.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/widgets/basewindow.cpp b/src/widgets/basewindow.cpp index eb780184d..65bc21b20 100644 --- a/src/widgets/basewindow.cpp +++ b/src/widgets/basewindow.cpp @@ -157,13 +157,15 @@ bool BaseWindow::hasCustomWindowFrame() void BaseWindow::themeRefreshEvent() { - QPalette palette; - palette.setColor(QPalette::Background, this->themeManager.windowBg); - palette.setColor(QPalette::Foreground, this->themeManager.windowText); - this->setPalette(palette); + if (this->enableCustomFrame) { + QPalette palette; + palette.setColor(QPalette::Background, this->themeManager.windowBg); + palette.setColor(QPalette::Foreground, this->themeManager.windowText); + this->setPalette(palette); - for (RippleEffectButton *button : this->buttons) { - button->setMouseEffectColor(this->themeManager.windowText); + for (RippleEffectButton *button : this->buttons) { + button->setMouseEffectColor(this->themeManager.windowText); + } } }