mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
Shrink font for playlist author
This commit is contained in:
@@ -299,6 +299,9 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
|||||||
QRect r( option.rect.width() - avatar.width() - 10, option.rect.top() + option.rect.height()/2 - avatar.height()/2, avatar.width(), avatar.height() );
|
QRect r( option.rect.width() - avatar.width() - 10, option.rect.top() + option.rect.height()/2 - avatar.height()/2, avatar.width(), avatar.height() );
|
||||||
painter->drawPixmap( r, avatar );
|
painter->drawPixmap( r, avatar );
|
||||||
|
|
||||||
|
QFont font2 = font;
|
||||||
|
font2.setPointSize( font2.pointSize() - 1 );
|
||||||
|
painter->setFont( font2 );
|
||||||
QString author = index.data( RecentlyPlayedPlaylistsModel::PlaylistRole ).value< Tomahawk::playlist_ptr >()->author()->friendlyName();
|
QString author = index.data( RecentlyPlayedPlaylistsModel::PlaylistRole ).value< Tomahawk::playlist_ptr >()->author()->friendlyName();
|
||||||
if ( author.contains( "@" ) )
|
if ( author.contains( "@" ) )
|
||||||
author = author.mid( 0, author.indexOf( '@' ) );
|
author = author.mid( 0, author.indexOf( '@' ) );
|
||||||
@@ -318,9 +321,6 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
|||||||
}
|
}
|
||||||
QColor c = painter->pen().color();
|
QColor c = painter->pen().color();
|
||||||
painter->setPen( QColor( Qt::gray ).darker() );
|
painter->setPen( QColor( Qt::gray ).darker() );
|
||||||
QFont font2 = font;
|
|
||||||
font2.setPointSize( font2.pointSize() - 1 );
|
|
||||||
painter->setFont( font2 );
|
|
||||||
|
|
||||||
QRect rectText = option.rect.adjusted( 66, 20, -leftEdge - 10, -8 );
|
QRect rectText = option.rect.adjusted( 66, 20, -leftEdge - 10, -8 );
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
|
Reference in New Issue
Block a user