1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 11:23:40 +00:00

(qt) Fix regression in file icons caused by printing filesizes in the file tree

This commit is contained in:
Daniel Lee 2010-05-24 05:29:36 +00:00
parent 06bea89970
commit e6b8c2e6d4

View file

@ -536,7 +536,10 @@ FileTreeDelegate :: paint( QPainter * painter,
if( index.model()->hasChildren( index ) )
icon = style->standardIcon( QStyle::StandardPixmap( QStyle::SP_DirOpenIcon ) );
else
icon = Utils :: guessMimeIcon( index.model()->data(index).toString( ) );
{
QString name = index.model()->data(index).toString();
icon = Utils :: guessMimeIcon( name.left( name.lastIndexOf( " (" ) ) );
}
icon.paint( painter, iconArea, Qt::AlignCenter, QIcon::Normal, QIcon::On );
// draw the name