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:
parent
06bea89970
commit
e6b8c2e6d4
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue