forked from qt-creator/qt-creator
Fixed the block highlighting with dark backgrounds
Due to multiplying by a factor, it failed to really make any difference. Done with mae.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user