summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-24 18:56:06 +0200
committerDanilo M. <danix@danix.xyz>2026-09-24 18:56:06 +0200
commita54fa9952d4eb7c17025b41320e1a434dcccc670 (patch)
tree78bb56a3ea91ecba5cf620549233275687ea5c59
parentff40d2a6dffdf234ade8bc4a5faa7624e58d5379 (diff)
downloadqtmaildir-a54fa9952d4eb7c17025b41320e1a434dcccc670.tar.gz
qtmaildir-a54fa9952d4eb7c17025b41320e1a434dcccc670.zip
fix: stop a chip's colour flooding the next calendar day cell
The month grid drew each cell's outline with drawRect while the brush was still set from the previous cell's all-day chip or today pill, so every day after one carrying an event was filled with that event's colour. Reset the brush before the outline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--src/monthview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/monthview.cpp b/src/monthview.cpp
index b1c5520..202ef4a 100644
--- a/src/monthview.cpp
+++ b/src/monthview.cpp
@@ -100,7 +100,10 @@ void MonthView::paintEvent(QPaintEvent *)
for (int c = 0; c < MonthLayout::kCells; ++c) {
const QRect cell = l.cellRect(c);
const QDate date = l.dateAt(c);
+ // The previous cell's chip or today pill left its brush set, and
+ // drawRect fills with it.
p.setPen(palette().color(QPalette::Mid));
+ p.setBrush(Qt::NoBrush);
p.drawRect(cell.adjusted(0, 0, -1, -1));
QRect number(cell.left() + 4, cell.top() + 1,