Commit 19cf95e2 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

<Merge branch 'release/22.04'

parents 94a184ab 6a6d7327
......@@ -180,12 +180,15 @@ void MonthGraphicsView::drawBackground(QPainter *p, const QRectF &rect)
font.setPointSize(15);
p->setFont(font);
const int dayLabelsHeight = 20;
const auto dayInMonth = mMonthView->averageDate();
p->drawText(QRect(0,
0, // top right
static_cast<int>(mScene->sceneRect().width()),
static_cast<int>(mScene->headerHeight() - dayLabelsHeight)),
Qt::AlignCenter,
mMonthView->averageDate().toString(QStringLiteral("MMMM yyyy")));
QStringLiteral("%1 %2")
.arg(QLocale().standaloneMonthName(dayInMonth.month(), QLocale::LongFormat))
.arg(dayInMonth.year()));
font.setPointSize(dayLabelsHeight - 10);
p->setFont(font);
......
Supports Markdown
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