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