From be21e5b52d2507a9d6d5df99cce30bc19c2736a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Sat, 13 Mar 2021 16:03:16 +0100 Subject: [PATCH] Fixed deprecated method QPalette::{Fore,Back}ground (#2510) Co-authored-by: pajlada --- src/util/RemoveScrollAreaBackground.hpp | 2 +- src/widgets/BaseWindow.cpp | 4 ++-- src/widgets/splits/SplitHeader.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/RemoveScrollAreaBackground.hpp b/src/util/RemoveScrollAreaBackground.hpp index d6dfe1540..82dfbf51d 100644 --- a/src/util/RemoveScrollAreaBackground.hpp +++ b/src/util/RemoveScrollAreaBackground.hpp @@ -11,7 +11,7 @@ static void removeScrollAreaBackground(QScrollArea *scrollArea, scrollArea->setFrameStyle(0); QPalette p; - p.setColor(QPalette::Background, QColor(0, 0, 0, 0)); + p.setColor(QPalette::Window, QColor(0, 0, 0, 0)); scrollArea->setPalette(p); childWidget->setPalette(p); } diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index 4ec3cae43..3466c08b0 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -327,8 +327,8 @@ void BaseWindow::themeChangedEvent() else { QPalette palette; - palette.setColor(QPalette::Background, this->theme->window.background); - palette.setColor(QPalette::Foreground, this->theme->window.text); + palette.setColor(QPalette::Window, this->theme->window.background); + palette.setColor(QPalette::WindowText, this->theme->window.text); this->setPalette(palette); } } diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 4746b8fa1..f4c65870c 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -886,12 +886,12 @@ void SplitHeader::themeChangedEvent() if (this->split_->hasFocus()) { - palette.setColor(QPalette::Foreground, + palette.setColor(QPalette::WindowText, this->theme->splits.header.focusedText); } else { - palette.setColor(QPalette::Foreground, this->theme->splits.header.text); + palette.setColor(QPalette::WindowText, this->theme->splits.header.text); } this->titleLabel_->setPalette(palette);