diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index c2f9328ce..4da4f82d2 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -65,17 +65,15 @@ PlaylistItemDelegate::sizeHint( const QStyleOptionViewItem& option, const QModel { QSize size = QStyledItemDelegate::sizeHint( option, index ); - if ( index.isValid() ) { - int style = index.data( PlayableProxyModel::StyleRole ).toInt(); - if ( style == PlayableProxyModel::Short || style == PlayableProxyModel::ShortWithAvatars ) + if ( m_model->style() == PlayableProxyModel::Short || m_model->style() == PlayableProxyModel::ShortWithAvatars ) { int rowHeight = option.fontMetrics.height() + 8; size.setHeight( rowHeight * 2 ); } - else if ( style == PlayableProxyModel::Detailed ) + else if ( m_model->style() == PlayableProxyModel::Detailed ) { - int rowHeight = option.fontMetrics.height() * 1.4; + int rowHeight = option.fontMetrics.height() * 1.6; size.setHeight( rowHeight ); } } diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.h b/src/libtomahawk/playlist/PlaylistItemDelegate.h index 53aac9ed7..1e81765f9 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.h +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.h @@ -34,7 +34,7 @@ class DLLEXPORT PlaylistItemDelegate : public QStyledItemDelegate Q_OBJECT public: - PlaylistItemDelegate( TrackView* parent = 0, PlayableProxyModel* proxy = 0 ); + PlaylistItemDelegate( TrackView* parent, PlayableProxyModel* proxy ); void updateRowSize( const QModelIndex& index );