Replace QPalette::Background by QPalette::Window (#3951)

Both QPalette::Background and QPalette::Window have the value 10,
there is no difference.
See https://doc.qt.io/qt-5/qpalette.html#ColorRole-enum
This commit is contained in:
Andreas Buhr
2024-01-10 19:52:51 +01:00
committed by GitHub
parent 63c9c124ac
commit ef43590fa0
18 changed files with 16 additions and 30 deletions

View File

@@ -2223,7 +2223,6 @@ OverviewWindow::configChanged(qint32)
// text edit colors
QPalette palette;
palette.setColor(QPalette::Window, GColor(COVERVIEWBACKGROUND));
palette.setColor(QPalette::Background, GColor(COVERVIEWBACKGROUND));
// only change base if moved away from white plots
// which is a Mac thing

View File

@@ -152,7 +152,6 @@ void PerformanceManagerWindow::configChanged()
QPalette palette;
palette.setBrush(QPalette::Window, QBrush(GColor(CPLOTBACKGROUND)));
palette.setBrush(QPalette::Background, QBrush(GColor(CPLOTBACKGROUND)));
palette.setBrush(QPalette::Base, QBrush(GColor(CPLOTBACKGROUND)));
palette.setColor(QPalette::WindowText, GCColor::invertColor(GColor(CPLOTBACKGROUND)));
palette.setColor(QPalette::Text, GCColor::invertColor(GColor(CPLOTBACKGROUND)));

View File

@@ -24,7 +24,7 @@ RaceRider::RaceRider(QWidget *parent, QColor color, QString name, QString id) :
{
QPalette pal = palette();
//QColor RGB = color.convertTo(QColor::Rgb);
pal.setColor(QPalette::Normal, QPalette::Background, color);
pal.setColor(QPalette::Normal, QPalette::Window, color);
pal.setColor(QPalette::Normal, QPalette::Base, color);
pal.setColor(QPalette::Normal, QPalette::Button, color);
pal.setColor(QPalette::Normal, QPalette::Text, Qt::black);