Replace no cover image
This commit is contained in:
@@ -95,7 +95,7 @@ void AlbumCoverChoiceController::SetApplication(Application *app) {
|
||||
app_ = app;
|
||||
|
||||
cover_fetcher_ = new AlbumCoverFetcher(app_->cover_providers(), this);
|
||||
cover_searcher_ = new AlbumCoverSearcher(QIcon(":/pictures/noalbumart.png"), app, this);
|
||||
cover_searcher_ = new AlbumCoverSearcher(QIcon(":/pictures/cdcase.png"), app, this);
|
||||
cover_searcher_->Init(cover_fetcher_);
|
||||
|
||||
connect(cover_fetcher_, SIGNAL(AlbumCoverFetched(quint64, QImage, CoverSearchStatistics)), this, SLOT(AlbumCoverFetched(quint64, QImage, CoverSearchStatistics)));
|
||||
|
||||
@@ -97,7 +97,7 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
|
||||
cover_exporter_(new AlbumCoverExporter(this)),
|
||||
artist_icon_(IconLoader::Load("folder-sound" )),
|
||||
all_artists_icon_(IconLoader::Load("vinyl" )),
|
||||
no_cover_icon_(":/pictures/noalbumart.png"),
|
||||
no_cover_icon_(":/pictures/cdcase.png"),
|
||||
no_cover_image_(GenerateNoCoverImage(no_cover_icon_)),
|
||||
no_cover_item_icon_(QPixmap::fromImage(no_cover_image_)),
|
||||
context_menu_(new QMenu(this)),
|
||||
@@ -119,8 +119,8 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
|
||||
|
||||
album_cover_choice_controller_->SetApplication(app_);
|
||||
|
||||
// Get a square version of noalbumart.png
|
||||
QImage nocover(":/pictures/noalbumart.png");
|
||||
// Get a square version of cdcase.png
|
||||
QImage nocover(":/pictures/cdcase.png");
|
||||
nocover = nocover.scaled(120, 120, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
QImage square_nocover(120, 120, QImage::Format_ARGB32);
|
||||
square_nocover.fill(0);
|
||||
@@ -128,7 +128,7 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
|
||||
p.setOpacity(0.4);
|
||||
p.drawImage((120 - nocover.width()) / 2, (120 - nocover.height()) / 2, nocover);
|
||||
p.end();
|
||||
// no_cover_item_icon_ = QPixmap::fromImage(square_nocover);
|
||||
// no_cover_item_icon_ = QPixmap::fromImage(square_nocover);
|
||||
|
||||
cover_searcher_ = new AlbumCoverSearcher(no_cover_item_icon_, app_, this);
|
||||
cover_export_ = new AlbumCoverExport(this);
|
||||
@@ -876,7 +876,7 @@ QString AlbumCoverManager::EffectiveAlbumArtistName(const QListWidgetItem &item)
|
||||
|
||||
QImage AlbumCoverManager::GenerateNoCoverImage(const QIcon &no_cover_icon) const {
|
||||
|
||||
// Get a square version of noalbumart.png with some transparency:
|
||||
// Get a square version of cdcase.png with some transparency:
|
||||
QImage nocover = no_cover_icon.pixmap(no_cover_icon.availableSizes().last()).toImage();
|
||||
nocover = nocover.scaled(120, 120, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
|
||||
@@ -40,16 +40,18 @@ CurrentArtLoader::CurrentArtLoader(Application *app, QObject *parent)
|
||||
app_(app),
|
||||
temp_file_pattern_(QDir::tempPath() + "/strawberry-art-XXXXXX.jpg"),
|
||||
id_(0)
|
||||
{
|
||||
{
|
||||
|
||||
options_.scale_output_image_ = false;
|
||||
options_.pad_output_image_ = false;
|
||||
//QIcon nocover = IconLoader::Load("nocover");
|
||||
//options_.default_output_image_ = nocover.pixmap(nocover.availableSizes().last()).toImage();
|
||||
options_.default_output_image_ = QImage(":/pictures/noalbumart.png");
|
||||
// QIcon nocover = IconLoader::Load("cdcase");
|
||||
// options_.default_output_image_ = nocover.pixmap(nocover.availableSizes().last()).toImage();
|
||||
options_.default_output_image_ = QImage(":/pictures/cdcase.png");
|
||||
|
||||
connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64, QImage)), SLOT(TempArtLoaded(quint64, QImage)));
|
||||
|
||||
connect(app_->playlist_manager(), SIGNAL(CurrentSongChanged(Song)), SLOT(LoadArt(Song)));
|
||||
|
||||
}
|
||||
|
||||
CurrentArtLoader::~CurrentArtLoader() {}
|
||||
|
||||
@@ -102,11 +102,11 @@ EditTagDialog::EditTagDialog(Application *app, QWidget *parent)
|
||||
cover_art_id_(0),
|
||||
cover_art_is_set_(false),
|
||||
results_dialog_(new TrackSelectionDialog(this))
|
||||
{
|
||||
{
|
||||
|
||||
//QIcon nocover = IconLoader::Load("nocover");
|
||||
//cover_options_.default_output_image_ = AlbumCoverLoader::ScaleAndPad(cover_options_, nocover.pixmap(nocover.availableSizes().last()).toImage());
|
||||
cover_options_.default_output_image_ = AlbumCoverLoader::ScaleAndPad(cover_options_, QImage(":/pictures/noalbumart.png"));
|
||||
// QIcon nocover = IconLoader::Load("cdcase");
|
||||
// cover_options_.default_output_image_ = AlbumCoverLoader::ScaleAndPad(cover_options_, nocover.pixmap(nocover.availableSizes().last()).toImage());
|
||||
cover_options_.default_output_image_ = AlbumCoverLoader::ScaleAndPad(cover_options_, QImage(":/pictures/cdcase.png"));
|
||||
|
||||
connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64,QImage,QImage)), SLOT(ArtLoaded(quint64,QImage,QImage)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user