From d8ea510a7cc1cb3b82d5db6bdf6891fd872739c0 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 20 Dec 2012 08:17:27 +0100 Subject: [PATCH] * Removed obsolete / incorrect ScaledCover enum from ImageMode. --- src/AudioControls.cpp | 2 +- src/libtomahawk/playlist/PlaylistChartItemDelegate.cpp | 2 +- src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 2 +- src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp | 2 +- src/libtomahawk/playlist/TreeItemDelegate.cpp | 4 ++-- src/libtomahawk/utils/TomahawkUtils.h | 1 - src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.cpp | 4 ++-- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/AudioControls.cpp b/src/AudioControls.cpp index a7e0f9660..dd8d82e42 100644 --- a/src/AudioControls.cpp +++ b/src/AudioControls.cpp @@ -329,7 +329,7 @@ AudioControls::setCover() ui->coverImage->setPixmap( TomahawkUtils::createRoundedImage( cover, QSize( 0, 0 ) ), false ); } else - ui->coverImage->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::ScaledCover, ui->coverImage->size() ), true ); + ui->coverImage->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::Original, ui->coverImage->size() ), true ); } diff --git a/src/libtomahawk/playlist/PlaylistChartItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistChartItemDelegate.cpp index ae50f3988..49c9cc7b9 100644 --- a/src/libtomahawk/playlist/PlaylistChartItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistChartItemDelegate.cpp @@ -207,7 +207,7 @@ PlaylistChartItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& if ( !m_pixmaps.contains( index ) ) { - m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->query(), pixmapRect.size(), TomahawkUtils::ScaledCover, false ) ) ); + m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->query(), pixmapRect.size(), TomahawkUtils::Original, false ) ) ); _detail::Closure* closure = NewClosure( m_pixmaps[ index ], SIGNAL( repaintRequest() ), const_cast(this), SLOT( doUpdateIndex( const QPersistentModelIndex& ) ), QPersistentModelIndex( index ) ); closure->setAutoDelete( false ); } diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index a1b875d4c..c2f9328ce 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -190,7 +190,7 @@ PlaylistItemDelegate::paintShort( QPainter* painter, const QStyleOptionViewItem& if ( pixmap.isNull() ) { if ( !useAvatars ) - pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::ScaledCover, ir.size() ); + pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultTrackImage, TomahawkUtils::Original, ir.size() ); else pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultSourceAvatar, TomahawkUtils::RoundedCorners, ir.size() ); } diff --git a/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp index cae2f5ea7..5efef5f3e 100644 --- a/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistLargeItemDelegate.cpp @@ -190,7 +190,7 @@ PlaylistLargeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& if ( !m_pixmaps.contains( index ) ) { - m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->query(), pixmapRect.size(), TomahawkUtils::ScaledCover, false ) ) ); + m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->query(), pixmapRect.size(), TomahawkUtils::RoundedCorners, false ) ) ); _detail::Closure* closure = NewClosure( m_pixmaps[ index ], SIGNAL( repaintRequest() ), const_cast(this), SLOT( doUpdateIndex( const QPersistentModelIndex& ) ), QPersistentModelIndex( index ) ); closure->setAutoDelete( false ); } diff --git a/src/libtomahawk/playlist/TreeItemDelegate.cpp b/src/libtomahawk/playlist/TreeItemDelegate.cpp index ea991cad3..207feca47 100644 --- a/src/libtomahawk/playlist/TreeItemDelegate.cpp +++ b/src/libtomahawk/playlist/TreeItemDelegate.cpp @@ -161,13 +161,13 @@ TreeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, { if ( !item->album().isNull() ) { - m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->album(), r.size(), TomahawkUtils::ScaledCover, false ) ) ); + m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->album(), r.size(), TomahawkUtils::Original, false ) ) ); _detail::Closure* closure = NewClosure( m_pixmaps[ index ], SIGNAL( repaintRequest() ), const_cast(this), SLOT( doUpdateIndex( const QPersistentModelIndex& ) ), QPersistentModelIndex( index ) ); closure->setAutoDelete( false ); } else if ( !item->artist().isNull() ) { - m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->artist(), r.size(), TomahawkUtils::ScaledCover, false ) ) ); + m_pixmaps.insert( index, QSharedPointer< Tomahawk::PixmapDelegateFader >( new Tomahawk::PixmapDelegateFader( item->artist(), r.size(), TomahawkUtils::Original, false ) ) ); _detail::Closure* closure = NewClosure( m_pixmaps[ index ], SIGNAL( repaintRequest() ), const_cast(this), SLOT( doUpdateIndex( const QPersistentModelIndex& ) ), QPersistentModelIndex( index ) ); closure->setAutoDelete( false ); } diff --git a/src/libtomahawk/utils/TomahawkUtils.h b/src/libtomahawk/utils/TomahawkUtils.h index b78f22ecb..8a40e3cac 100644 --- a/src/libtomahawk/utils/TomahawkUtils.h +++ b/src/libtomahawk/utils/TomahawkUtils.h @@ -127,7 +127,6 @@ namespace TomahawkUtils { Original, CoverInCase, - ScaledCover, Grid, DropShadow, RoundedCorners diff --git a/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.cpp b/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.cpp index 4ec6566cc..4633ee4d1 100644 --- a/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.cpp +++ b/src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.cpp @@ -76,8 +76,8 @@ AlbumInfoWidget::AlbumInfoWidget( const Tomahawk::album_ptr& album, QWidget* par ui->tracks->setFrameShape( QFrame::StyledPanel ); ui->tracks->setAttribute( Qt::WA_MacShowFocusRect, 0 ); - m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::ScaledCover, QSize( 48, 48 ) ); - ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::ScaledCover, QSize( ui->cover->sizeHint() ) ) ); + m_pixmap = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultArtistImage, TomahawkUtils::Original, QSize( 48, 48 ) ); + ui->cover->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::Original, QSize( ui->cover->sizeHint() ) ) ); ui->biography->setFrameShape( QFrame::NoFrame ); ui->biography->setAttribute( Qt::WA_MacShowFocusRect, 0 );