Skip to content

Commit 57df31e

Browse files
committed
some cautionary comments
1 parent da2820c commit 57df31e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/listview.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,15 +1247,22 @@ void ListViewDelegate::addTextPixmap(QPixmap** pp, SCRef txt, const QStyleOption
12471247
QPainter p;
12481248
p.begin(newPm);
12491249

1250+
// TODO base palette color is not necessarily the background color of the
1251+
// listview row this pixmap will be pasted into, e.g. in Qt themes that use
1252+
// alternating backgrounds for listview rows.
12501253
newPm->fill(opt.palette.base().color());
1254+
1255+
// Add back what was there before.
12511256
if (!pm->isNull()) p.drawPixmap(0, 0, *pm);
12521257

12531258
p.setPen(opt.palette.color(QPalette::WindowText));
12541259
p.setBrush(opt.palette.color(QPalette::Window));
12551260
p.setFont(opt.font);
12561261

1262+
// Paint the new tag.
12571263
p.drawRect(offset, 0, text_width - 1, text_height - 1);
12581264
p.drawText(offset + text_spacing, fm.ascent(), txt);
1265+
12591266
p.end();
12601267

12611268
delete pm;

0 commit comments

Comments
 (0)