Commit b295cd8d authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Make events stand out from holidays when printing

Use different colors for the backgrounds of events and holidays (i.e.
weekends) when printing timetables.
parent 77a81d7a
Pipeline #74096 passed with stage
in 4 minutes and 43 seconds
......@@ -701,7 +701,7 @@ void CalPrintTimetable::drawAllDayBox(QPainter &p,
int lineSpacing = p.fontMetrics().lineSpacing();
if (!workDays.contains(qd)) {
drawShadedBox(p, BOX_BORDER_WIDTH, QColor(232, 232, 232), box);
drawShadedBox(p, BOX_BORDER_WIDTH, sHolidayBackground, box);
} else {
drawBox(p, BOX_BORDER_WIDTH, box);
}
......
......@@ -39,6 +39,8 @@ static QString cleanStr(const QString &instr)
return ret.replace(QLatin1Char('\n'), QLatin1Char(' '));
}
const QColor CalPrintPluginBase::sHolidayBackground = QColor(244, 244, 244);
/******************************************************************
** The Todo positioning structure **
******************************************************************/
......@@ -786,7 +788,7 @@ void CalPrintPluginBase::drawAgendaDayBox(QPainter &p,
}
if (!workDays.contains(qd)) {
drawShadedBox(p, BOX_BORDER_WIDTH, QColor(232, 232, 232), oldbox);
drawShadedBox(p, BOX_BORDER_WIDTH, sHolidayBackground, oldbox);
} else {
drawBox(p, BOX_BORDER_WIDTH, oldbox);
}
......
......@@ -555,6 +555,8 @@ protected:
int mPadding;
int mBorder;
static const QColor sHolidayBackground;
private:
QColor categoryColor(const QStringList &categories) const;
......
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