Replace QFontMetrics::width with horizontalAdvance, dark with darker, background() with window() and QString::null with QString()

This commit is contained in:
Jonas Kvinge
2019-07-08 22:19:14 +02:00
parent 51462dee1e
commit 870dc0d36f
11 changed files with 18 additions and 18 deletions

View File

@@ -345,12 +345,12 @@ void BlockAnalyzer::paletteChange(const QPalette&) {
p.fillRect(0, y * (kHeight + 1), kWidth, kHeight, QColor(r + static_cast<int>(dr * y), g + static_cast<int>(dg * y), 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 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();
@@ -380,7 +380,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);