1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-02-25 20:33:20 +01:00

Draw row bgs properly, expanding for playlists

This commit is contained in:
Leo Franchi 2011-02-26 17:55:37 -05:00
parent fbaa48187b
commit 113985eea9

View File

@ -492,9 +492,13 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
o.palette.setColor( QPalette::Text, o.palette.color( QPalette::HighlightedText ) ); o.palette.setColor( QPalette::Text, o.palette.color( QPalette::HighlightedText ) );
} }
} }
QStyledItemDelegate::paint( painter, o2, QModelIndex() ); QStyleOptionViewItemV4 o3 = option;
if ( index.data( SourceTreeItem::Type ) != SourcesModel::CollectionSource )
o3.rect.setX( 0 );
QApplication::style()->drawControl( QStyle::CE_ItemViewItem, &o3, painter );
if ( index.data( SourceTreeItem::Type ) == SourcesModel::CollectionSource ) if ( index.data( SourceTreeItem::Type ) == SourcesModel::CollectionSource )
{ {
painter->save(); painter->save();