Commit 5c3db09d authored by Allen Winter's avatar Allen Winter
Browse files

Merge branch 'release/19.12'

parents 4f00c852 e031408f
......@@ -1660,23 +1660,20 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
}
}
// Compute the grid line color for both the hour and half-hour
// The grid colors are always computed as a function of the palette's windowText color.
QPen hourPen;
QPen halfHourPen;
if (!d->preferences()->useSystemColor()) {
hourPen = d->preferences()->agendaGridBackgroundColor().darker(150);
halfHourPen = d->preferences()->agendaGridBackgroundColor().darker(125);
const QColor windowTextColor = palette().color(QPalette::WindowText);
if (windowTextColor.red() + windowTextColor.green() + windowTextColor.blue() < (256 / 2 * 3)) {
// dark grey line
hourPen = windowTextColor.lighter(200);
halfHourPen = windowTextColor.lighter(500);
} else {
const QColor windowTextColor = palette().color(QPalette::WindowText);
if (windowTextColor.red() + windowTextColor.green() + windowTextColor.blue() < (256 / 2 * 3)) {
// dark grey line
hourPen = windowTextColor.lighter(200);
halfHourPen = windowTextColor.lighter(500);
} else {
// light grey line
hourPen = windowTextColor.darker(150);
halfHourPen = windowTextColor.darker(200);
}
// light grey line
hourPen = windowTextColor.darker(150);
halfHourPen = windowTextColor.darker(200);
}
dbp.setPen(hourPen);
......
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