Fixed deprecated method QPalette::{Fore,Back}ground (#2510)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł 2021-03-13 16:03:16 +01:00 committed by GitHub
parent 8a4ffc5f5b
commit be21e5b52d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -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);
}

View file

@ -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);
}
}

View file

@ -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);