mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-28 11:42:42 +01:00
fix up
Merge branch 'master' into sourcelistrefactor Conflicts: src/sourcetree/sourcetreeview.cpp
This commit is contained in:
commit
dd5c7b0af4
@ -204,7 +204,7 @@ private slots:
|
||||
void onDynamicPlaylistLoaded( Tomahawk::DynamicPlaylistRevision revision );
|
||||
|
||||
private:
|
||||
void checkReparentHackNeeded( const DynamicPlaylistRevision& rev );
|
||||
void checkReparentHackNeeded( const Tomahawk::DynamicPlaylistRevision& rev );
|
||||
|
||||
Tomahawk::dynplaylist_ptr m_dynplaylist;
|
||||
};
|
||||
|
@ -404,6 +404,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
QPixmap avatar( RESPATH "images/user-avatar.png" );
|
||||
|
||||
QString tracks;
|
||||
QString name = index.data().toString();
|
||||
int figWidth = 0;
|
||||
|
||||
if ( status && colItem && !colItem->source().isNull() )
|
||||
@ -412,6 +413,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
figWidth = painter->fontMetrics().width( tracks );
|
||||
if ( !colItem->source()->avatar().isNull() )
|
||||
avatar = colItem->source()->avatar();
|
||||
name = colItem->source()->friendlyName();
|
||||
}
|
||||
|
||||
QRect iconRect = option.rect.adjusted( 4, 6, -option.rect.width() + option.rect.height() - 12 + 4, -6 );
|
||||
@ -426,7 +428,7 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
|
||||
QRect textRect = option.rect.adjusted( iconRect.width() + 8, 6, -figWidth - 24, 0 );
|
||||
if ( status || colItem->source().isNull() )
|
||||
painter->setFont( bold );
|
||||
QString text = painter->fontMetrics().elidedText( index.data().toString(), Qt::ElideRight, textRect.width() );
|
||||
QString text = painter->fontMetrics().elidedText( name, Qt::ElideRight, textRect.width() );
|
||||
painter->drawText( textRect, text );
|
||||
|
||||
QString desc = status ? colItem->source()->textStatus() : tr( "Offline" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user