From 447536958e77c50102212001635294549ef5fdee Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 6 Jun 2012 16:42:22 +0200 Subject: [PATCH] * Give sidebar figures a bit more space and use a thicker font. --- src/sourcetree/SourceDelegate.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sourcetree/SourceDelegate.cpp b/src/sourcetree/SourceDelegate.cpp index bd3c4a8eb..4f2f35670 100644 --- a/src/sourcetree/SourceDelegate.cpp +++ b/src/sourcetree/SourceDelegate.cpp @@ -145,10 +145,13 @@ SourceDelegate::paintDecorations( QPainter* painter, const QStyleOptionViewItem& void SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const { - QFont normal = painter->font(); - QFont bold = painter->font(); + QFont normal = option.font; + QFont bold = option.font; bold.setBold( true ); + QFont figFont = bold; + figFont.setFamily( "Arial Bold" ); + figFont.setWeight( QFont::Black ); figFont.setPixelSize( 10 ); SourceTreeItem* item = index.data( SourcesModel::SourceTreeItemRole ).value< SourceTreeItem* >(); @@ -254,7 +257,7 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& { 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; figRect.adjust( 0, hd, 0, hd );