Git commit 1d7ca1a7d0bb0d56db4ad1c17ad3c5bd9c2e49dc by Till Adam. Committed on 30/04/2011 at 22:35. Pushed by tilladam into branch 'master'. Vertically center the text in the folder tree cells. Makes things look nicer with larger folder icon sizes. M +4 -4 akonadi/collectionstatisticsdelegate.cpp http://commits.kde.org/kdepimlibs/1d7ca1a7d0bb0d56db4ad1c17ad3c5bd9c2e49dc diff --git a/akonadi/collectionstatisticsdelegate.cpp b/akonadi/collectionstatisticsdelegate.cpp index adf5984..0085abc 100644 --- a/akonadi/collectionstatisticsdelegate.cpp +++ b/akonadi/collectionstatisticsdelegate.cpp @@ -279,9 +279,9 @@ void CollectionStatisticsDelegate::paint( QPainter *painter, unreadRect.setLeft( folderRect.right() ); // Draw folder name and unread count - painter->drawText( folderRect, Qt::AlignLeft, folderName ); + painter->drawText( folderRect, Qt::AlignLeft | Qt::AlignVCenter, folderName ); painter->setPen( unreadColor ); - painter->drawText( unreadRect, Qt::AlignLeft, unread ); + painter->drawText( unreadRect, Qt::AlignLeft | Qt::AlignVCenter, unread ); } else if ( option.decorationPosition == QStyleOptionViewItem::Top ) { // draw over the icon painter->setPen( unreadColor ); @@ -313,12 +313,12 @@ void CollectionStatisticsDelegate::paint( QPainter *painter, } } - painter->drawText( textRect, Qt::AlignRight, sumText ); + painter->drawText( textRect, Qt::AlignRight | Qt::AlignVCenter, sumText ); return; } - painter->drawText( textRect, option4.displayAlignment, text ); + painter->drawText( textRect, option4.displayAlignment | Qt::AlignVCenter, text ); } #include "collectionstatisticsdelegate.moc"