Merge pull request #6503 from jonaski/darker
Replace use of QColor::dark and QPalette::background
This commit is contained in:
commit
cfa3ea0dca
|
@ -367,12 +367,12 @@ void BlockAnalyzer::paletteChange(const QPalette&) {
|
|||
b + static_cast<int>(db * y)));
|
||||
|
||||
{
|
||||
const QColor bg = palette().color(QPalette::Background).dark(112);
|
||||
const QColor bg = palette().color(QPalette::Background).darker(112);
|
||||
|
||||
// make a complimentary fadebar colour
|
||||
// TODO(John Maguire): dark is not always correct, dumbo!
|
||||
int h, s, v;
|
||||
palette().color(QPalette::Background).dark(150).getHsv(&h, &s, &v);
|
||||
palette().color(QPalette::Background).darker(150).getHsv(&h, &s, &v);
|
||||
const QColor fg(QColor::fromHsv(h + 120, s, v));
|
||||
|
||||
const double dr = fg.red() - bg.red();
|
||||
|
@ -403,7 +403,7 @@ void BlockAnalyzer::drawBackground() {
|
|||
}
|
||||
|
||||
const QColor bg = palette().color(QPalette::Background);
|
||||
const QColor bgdark = bg.dark(112);
|
||||
const QColor bgdark = bg.darker(112);
|
||||
|
||||
background_.fill(bg);
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ void NowPlayingWidget::SetImage(const QImage& image) {
|
|||
if (visible_) {
|
||||
// Cache the current pixmap so we can fade between them
|
||||
previous_track_ = QPixmap(size());
|
||||
previous_track_.fill(palette().background().color());
|
||||
previous_track_.fill(palette().window().color());
|
||||
previous_track_opacity_ = 1.0;
|
||||
QPainter p(&previous_track_);
|
||||
DrawContents(&p);
|
||||
|
|
Loading…
Reference in New Issue