1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-02-07 15:28:47 +01:00

Replace no cover image

This commit is contained in:
Jonas Kvinge 2019-02-09 14:51:12 +01:00
parent 676f8dc8be
commit a25052ed96
15 changed files with 17 additions and 20 deletions

View File

@ -10,8 +10,8 @@
<file>misc/oauthsuccess.html</file> <file>misc/oauthsuccess.html</file>
<file>pictures/strawberry.png</file> <file>pictures/strawberry.png</file>
<file>pictures/strawberry-faded.png</file> <file>pictures/strawberry-faded.png</file>
<file>pictures/noalbumart.png</file>
<file>pictures/nomusic.png</file> <file>pictures/nomusic.png</file>
<file>pictures/cdcase.png</file>
<file>pictures/musicbrainz.png</file> <file>pictures/musicbrainz.png</file>
<file>pictures/tiny-play.png</file> <file>pictures/tiny-play.png</file>
<file>pictures/tiny-pause.png</file> <file>pictures/tiny-pause.png</file>

View File

@ -63,7 +63,6 @@
<file>icons/128x128/media-rewind.png</file> <file>icons/128x128/media-rewind.png</file>
<file>icons/128x128/media-stop.png</file> <file>icons/128x128/media-stop.png</file>
<file>icons/128x128/nvidia.png</file> <file>icons/128x128/nvidia.png</file>
<file>icons/128x128/play2.png</file>
<file>icons/128x128/realtek.png</file> <file>icons/128x128/realtek.png</file>
<file>icons/128x128/search.png</file> <file>icons/128x128/search.png</file>
<file>icons/128x128/soundcard.png</file> <file>icons/128x128/soundcard.png</file>
@ -151,7 +150,6 @@
<file>icons/64x64/media-rewind.png</file> <file>icons/64x64/media-rewind.png</file>
<file>icons/64x64/media-stop.png</file> <file>icons/64x64/media-stop.png</file>
<file>icons/64x64/nvidia.png</file> <file>icons/64x64/nvidia.png</file>
<file>icons/64x64/play2.png</file>
<file>icons/64x64/pulseaudio.png</file> <file>icons/64x64/pulseaudio.png</file>
<file>icons/64x64/realtek.png</file> <file>icons/64x64/realtek.png</file>
<file>icons/64x64/search.png</file> <file>icons/64x64/search.png</file>
@ -242,7 +240,6 @@
<file>icons/48x48/media-rewind.png</file> <file>icons/48x48/media-rewind.png</file>
<file>icons/48x48/media-stop.png</file> <file>icons/48x48/media-stop.png</file>
<file>icons/48x48/nvidia.png</file> <file>icons/48x48/nvidia.png</file>
<file>icons/48x48/play2.png</file>
<file>icons/48x48/pulseaudio.png</file> <file>icons/48x48/pulseaudio.png</file>
<file>icons/48x48/realtek.png</file> <file>icons/48x48/realtek.png</file>
<file>icons/48x48/search.png</file> <file>icons/48x48/search.png</file>
@ -332,7 +329,6 @@
<file>icons/32x32/media-rewind.png</file> <file>icons/32x32/media-rewind.png</file>
<file>icons/32x32/media-stop.png</file> <file>icons/32x32/media-stop.png</file>
<file>icons/32x32/nvidia.png</file> <file>icons/32x32/nvidia.png</file>
<file>icons/32x32/play2.png</file>
<file>icons/32x32/pulseaudio.png</file> <file>icons/32x32/pulseaudio.png</file>
<file>icons/32x32/realtek.png</file> <file>icons/32x32/realtek.png</file>
<file>icons/32x32/search.png</file> <file>icons/32x32/search.png</file>
@ -424,7 +420,6 @@
<file>icons/22x22/media-rewind.png</file> <file>icons/22x22/media-rewind.png</file>
<file>icons/22x22/media-stop.png</file> <file>icons/22x22/media-stop.png</file>
<file>icons/22x22/nvidia.png</file> <file>icons/22x22/nvidia.png</file>
<file>icons/22x22/play2.png</file>
<file>icons/22x22/pulseaudio.png</file> <file>icons/22x22/pulseaudio.png</file>
<file>icons/22x22/realtek.png</file> <file>icons/22x22/realtek.png</file>
<file>icons/22x22/search.png</file> <file>icons/22x22/search.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

BIN
data/pictures/cdcase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -95,7 +95,7 @@ void AlbumCoverChoiceController::SetApplication(Application *app) {
app_ = app; app_ = app;
cover_fetcher_ = new AlbumCoverFetcher(app_->cover_providers(), this); 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_); cover_searcher_->Init(cover_fetcher_);
connect(cover_fetcher_, SIGNAL(AlbumCoverFetched(quint64, QImage, CoverSearchStatistics)), this, SLOT(AlbumCoverFetched(quint64, QImage, CoverSearchStatistics))); connect(cover_fetcher_, SIGNAL(AlbumCoverFetched(quint64, QImage, CoverSearchStatistics)), this, SLOT(AlbumCoverFetched(quint64, QImage, CoverSearchStatistics)));

View File

@ -97,7 +97,7 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
cover_exporter_(new AlbumCoverExporter(this)), cover_exporter_(new AlbumCoverExporter(this)),
artist_icon_(IconLoader::Load("folder-sound" )), artist_icon_(IconLoader::Load("folder-sound" )),
all_artists_icon_(IconLoader::Load("vinyl" )), 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_image_(GenerateNoCoverImage(no_cover_icon_)),
no_cover_item_icon_(QPixmap::fromImage(no_cover_image_)), no_cover_item_icon_(QPixmap::fromImage(no_cover_image_)),
context_menu_(new QMenu(this)), context_menu_(new QMenu(this)),
@ -119,8 +119,8 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
album_cover_choice_controller_->SetApplication(app_); album_cover_choice_controller_->SetApplication(app_);
// Get a square version of noalbumart.png // Get a square version of cdcase.png
QImage nocover(":/pictures/noalbumart.png"); QImage nocover(":/pictures/cdcase.png");
nocover = nocover.scaled(120, 120, Qt::KeepAspectRatio, Qt::SmoothTransformation); nocover = nocover.scaled(120, 120, Qt::KeepAspectRatio, Qt::SmoothTransformation);
QImage square_nocover(120, 120, QImage::Format_ARGB32); QImage square_nocover(120, 120, QImage::Format_ARGB32);
square_nocover.fill(0); square_nocover.fill(0);
@ -876,7 +876,7 @@ QString AlbumCoverManager::EffectiveAlbumArtistName(const QListWidgetItem &item)
QImage AlbumCoverManager::GenerateNoCoverImage(const QIcon &no_cover_icon) const { 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(); QImage nocover = no_cover_icon.pixmap(no_cover_icon.availableSizes().last()).toImage();
nocover = nocover.scaled(120, 120, Qt::KeepAspectRatio, Qt::SmoothTransformation); nocover = nocover.scaled(120, 120, Qt::KeepAspectRatio, Qt::SmoothTransformation);

View File

@ -41,15 +41,17 @@ CurrentArtLoader::CurrentArtLoader(Application *app, QObject *parent)
temp_file_pattern_(QDir::tempPath() + "/strawberry-art-XXXXXX.jpg"), temp_file_pattern_(QDir::tempPath() + "/strawberry-art-XXXXXX.jpg"),
id_(0) id_(0)
{ {
options_.scale_output_image_ = false; options_.scale_output_image_ = false;
options_.pad_output_image_ = false; options_.pad_output_image_ = false;
//QIcon nocover = IconLoader::Load("nocover"); // QIcon nocover = IconLoader::Load("cdcase");
// options_.default_output_image_ = nocover.pixmap(nocover.availableSizes().last()).toImage(); // options_.default_output_image_ = nocover.pixmap(nocover.availableSizes().last()).toImage();
options_.default_output_image_ = QImage(":/pictures/noalbumart.png"); options_.default_output_image_ = QImage(":/pictures/cdcase.png");
connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64, QImage)), SLOT(TempArtLoaded(quint64, QImage))); connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64, QImage)), SLOT(TempArtLoaded(quint64, QImage)));
connect(app_->playlist_manager(), SIGNAL(CurrentSongChanged(Song)), SLOT(LoadArt(Song))); connect(app_->playlist_manager(), SIGNAL(CurrentSongChanged(Song)), SLOT(LoadArt(Song)));
} }
CurrentArtLoader::~CurrentArtLoader() {} CurrentArtLoader::~CurrentArtLoader() {}

View File

@ -104,9 +104,9 @@ EditTagDialog::EditTagDialog(Application *app, QWidget *parent)
results_dialog_(new TrackSelectionDialog(this)) results_dialog_(new TrackSelectionDialog(this))
{ {
//QIcon nocover = IconLoader::Load("nocover"); // 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_, nocover.pixmap(nocover.availableSizes().last()).toImage());
cover_options_.default_output_image_ = AlbumCoverLoader::ScaleAndPad(cover_options_, QImage(":/pictures/noalbumart.png")); 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))); connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64,QImage,QImage)), SLOT(ArtLoaded(quint64,QImage,QImage)));