From dec530cc24a8398efc71f3f8168d98ca9cd3f00c Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 4 Jan 2013 11:17:59 +0100 Subject: [PATCH] * Fixed default row sizehints in Album- & PlaylistLargeItemDelegate. --- src/libtomahawk/playlist/AlbumItemDelegate.cpp | 7 ++----- src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/libtomahawk/playlist/AlbumItemDelegate.cpp b/src/libtomahawk/playlist/AlbumItemDelegate.cpp index bdb38681a..2ba6700e2 100644 --- a/src/libtomahawk/playlist/AlbumItemDelegate.cpp +++ b/src/libtomahawk/playlist/AlbumItemDelegate.cpp @@ -64,11 +64,8 @@ AlbumItemDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelInd { QSize size = QStyledItemDelegate::sizeHint( option, index ); - if ( index.isValid() ) - { - int rowHeight = option.fontMetrics.height() + 8; - size.setHeight( rowHeight * 1.5 ); - } + int rowHeight = option.fontMetrics.height() + 8; + size.setHeight( rowHeight * 1.5 ); return size; } diff --git a/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp index ed3858dbb..30d248fcf 100644 --- a/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp @@ -68,11 +68,8 @@ PlaylistLargeItemDelegate::sizeHint( const QStyleOptionViewItem& option, const Q { QSize size = QStyledItemDelegate::sizeHint( option, index ); - if ( index.isValid() ) - { - int rowHeight = option.fontMetrics.height() + 8; - size.setHeight( rowHeight * 3 ); - } + int rowHeight = option.fontMetrics.height() + 8; + size.setHeight( rowHeight * 3 ); return size; }