A try at fixing the instance delegate. A bit. Maybe.

This commit is contained in:
Petr Mrázek 2014-02-04 02:01:11 +01:00
parent 7839c4ecc0
commit 6206a241ea

View File

@ -173,6 +173,7 @@ void ListViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
opt2.palette.setCurrentColorGroup(cg);
// fill in background, if any
if (opt.backgroundBrush.style() != Qt::NoBrush)
{
QPointF oldBO = painter->brushOrigin();
@ -181,6 +182,9 @@ void ListViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
painter->setBrushOrigin(oldBO);
}
drawSelectionRect(painter, opt2, textHighlightRect);
/*
if (opt.showDecorationSelected)
{
drawSelectionRect(painter, opt2, opt.rect);
@ -200,6 +204,7 @@ void ListViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
drawFocusRect(painter, opt2, textHighlightRect);
}
}
*/
}
// draw the icon