1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

* Give sidebar figures a bit more space and use a thicker font.

This commit is contained in:
Christian Muehlhaeuser
2012-06-06 16:42:22 +02:00
parent 43d2bb7716
commit 447536958e

View File

@@ -145,10 +145,13 @@ SourceDelegate::paintDecorations( QPainter* painter, const QStyleOptionViewItem&
void void
SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
{ {
QFont normal = painter->font(); QFont normal = option.font;
QFont bold = painter->font(); QFont bold = option.font;
bold.setBold( true ); bold.setBold( true );
QFont figFont = bold; QFont figFont = bold;
figFont.setFamily( "Arial Bold" );
figFont.setWeight( QFont::Black );
figFont.setPixelSize( 10 ); figFont.setPixelSize( 10 );
SourceTreeItem* item = index.data( SourcesModel::SourceTreeItemRole ).value< SourceTreeItem* >(); SourceTreeItem* item = index.data( SourcesModel::SourceTreeItemRole ).value< SourceTreeItem* >();
@@ -254,7 +257,7 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem&
{ {
painter->setRenderHint( QPainter::Antialiasing ); painter->setRenderHint( QPainter::Antialiasing );
QRect figRect = option.rect.adjusted( option.rect.width() - figWidth - 8, 0, -13, -option.rect.height() + 16 ); QRect figRect = option.rect.adjusted( option.rect.width() - figWidth - 13, 0, -14, -option.rect.height() + 16 );
int hd = ( option.rect.height() - figRect.height() ) / 2; int hd = ( option.rect.height() - figRect.height() ) / 2;
figRect.adjust( 0, hd, 0, hd ); figRect.adjust( 0, hd, 0, hd );