Commit 5563df92 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Bin icon view: clips used in timeline use bold font for name

parent 6741f01b
......@@ -418,7 +418,12 @@ public:
if (!index.data().isNull()) {
QStyleOptionViewItem opt(option);
initStyleOption(&opt, index);
QStyledItemDelegate::paint(painter, option, index);
// Draw usage counter
int usage = index.data(AbstractProjectItem::UsageCount).toInt();
if (usage > 0) {
opt.font.setBold(true);
}
QStyledItemDelegate::paint(painter, opt, index);
int adjust = (opt.rect.width() - opt.decorationSize.width()) / 2;
QRect rect(opt.rect.x(), opt.rect.y(), opt.decorationSize.width(), opt.decorationSize.height());
if (adjust > 0 && adjust < rect.width()) {
......
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