Commit a81a90fc authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed the block highlighting with dark backgrounds

Due to multiplying by a factor, it failed to really make any difference.

Done with mae.
parent c538a814
......@@ -1786,11 +1786,23 @@ static QColor calcBlendColor(const QColor &baseColor, int level, int count)
QColor color90;
if (baseColor.value() > 128) {
color80 = baseColor.lighter(90);
color90 = baseColor.lighter(95);
const int f90 = 15;
const int f80 = 30;
color80.setRgb(qMax(0, baseColor.red() - f80),
qMax(0, baseColor.green() - f80),
qMax(0, baseColor.blue() - f80));
color90.setRgb(qMax(0, baseColor.red() - f90),
qMax(0, baseColor.green() - f90),
qMax(0, baseColor.blue() - f90));
} else {
color80 = baseColor.lighter(110);
color90 = baseColor.lighter(105);
const int f90 = 20;
const int f80 = 40;
color80.setRgb(qMin(255, baseColor.red() + f80),
qMin(255, baseColor.green() + f80),
qMin(255, baseColor.blue() + f80));
color90.setRgb(qMin(255, baseColor.red() + f90),
qMin(255, baseColor.green() + f90),
qMin(255, baseColor.blue() + f90));
}
if (level == count)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment