Skip to content

Commit

Permalink
Add a modified verison of Humanity CD icon. Previously icon from them…
Browse files Browse the repository at this point in the history
…e was chosen.
  • Loading branch information
CDrummond committed Dec 9, 2015
1 parent 9eed8d4 commit 0b415b2
Show file tree
Hide file tree
Showing 20 changed files with 142 additions and 15 deletions.
2 changes: 2 additions & 0 deletions cantata.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
<file alias="tunein">streams/icons/tunein.svg</file>
<file alias="dirble">streams/icons/dirble.svg</file>

<file alias="album.svg">icons/media-optical.svg</file>
<file alias="album32.svg">icons/media-optical32.svg</file>
<file alias="artist.svg">icons/view-media-artist.svg</file>
<file alias="genre.svg">icons/view-media-genre.svg</file>
<file alias="radio16.png">icons/view-radiostream16.png</file>
Expand Down
2 changes: 1 addition & 1 deletion devices/albumdetailsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ void AlbumDetailsDialog::update(QTreeWidgetItem *i, const Song &s)
void AlbumDetailsDialog::setCover()
{
int iconSize=cover->size().width()<=128 ? 128 : 256;
cover->setPixmap(Icons::self()->albumIcon.pixmap(iconSize, iconSize).scaled(cover->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
cover->setPixmap(Icons::self()->albumIcon(iconSize).pixmap(iconSize, iconSize).scaled(cover->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
}

bool AlbumDetailsDialog::eventFilter(QObject *object, QEvent *event)
Expand Down
4 changes: 2 additions & 2 deletions gui/covers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ QPixmap * Covers::defaultPix(const Song &song, int size, int origSize)
? Icons::self()->artistIcon
: podcast
? Icons::self()->podcastIcon
: Icons::self()->albumIcon;
: Icons::self()->albumIcon(size);
pix=new QPixmap(icn.pixmap(size, size).scaled(QSize(size, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
#if QT_VERSION >= 0x050100
if (size!=origSize) {
Expand Down Expand Up @@ -1263,7 +1263,7 @@ QPixmap * Covers::get(const Song &song, int size, bool urgent)
// Load artist image...
pix=new QPixmap(Icons::self()->artistIcon.pixmap(size, size).scaled(QSize(size, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
} else if (Song::SingleTracks==song.type) {
pix=new QPixmap(Icons::self()->albumIcon.pixmap(size, size).scaled(QSize(size, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
pix=new QPixmap(Icons::self()->albumIcon(size).pixmap(size, size).scaled(QSize(size, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
} else if (song.isStandardStream()) {
pix=new QPixmap(Icons::self()->streamIcon.pixmap(size, size).scaled(QSize(size, size), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
} else if (isOnlineServiceImage(song)) {
Expand Down
2 changes: 1 addition & 1 deletion gui/currentcover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const QImage & CurrentCover::stdImage(bool stream)
#else
if (img.isNull()) {
int iconSize=Icon::stdSize(Utils::scaleForDpi(128));
img = (stream ? Icons::self()->streamIcon : Icons::self()->albumIcon).pixmap(iconSize, iconSize).toImage();
img = (stream ? Icons::self()->streamIcon : Icons::self()->albumIcon(iconSize)).pixmap(iconSize, iconSize).toImage();

QString &file=stream ? noStreamCoverFileName : noCoverFileName;
if (stream && file.isEmpty()) {
Expand Down
63 changes: 63 additions & 0 deletions icons/media-optical.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions icons/media-optical32.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion models/musicmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ QVariant MusicModel::data(const QModelIndex &index, int role) const
case MusicLibraryItem::Type_Artist:
return Icons::self()->artistIcon;
case MusicLibraryItem::Type_Album:
return Icons::self()->albumIcon;
return Icons::self()->albumIcon(32);
case MusicLibraryItem::Type_Song:
return Song::Playlist==static_cast<MusicLibraryItemSong *>(item)->song().type ? Icons::self()->playlistListIcon : Icons::self()->audioListIcon;
default:
Expand Down
2 changes: 1 addition & 1 deletion models/sqllibrarymodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ QVariant SqlLibraryModel::data(const QModelIndex &index, int role) const
case T_Artist:
return Icons::self()->artistIcon;
case T_Album:
return Icons::self()->albumIcon;
return Icons::self()->albumIcon(32);
case T_Track:
return Song::Playlist==item->getSong().type ? Icons::self()->playlistListIcon : Icons::self()->audioListIcon;
default:
Expand Down
2 changes: 1 addition & 1 deletion widgets/groupedview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class GroupedViewDelegate : public ActionItemDelegate
pix=index.data(Qt::DecorationRole).value<QIcon>().pixmap(constCoverSize, constCoverSize);
} else {
QPixmap *cover=/*stream ? 0 : */Covers::self()->get(song, constCoverSize);
pix=cover ? *cover : (stream && !song.isCdda() ? Icons::self()->streamIcon : Icons::self()->albumIcon).pixmap(constCoverSize, constCoverSize);
pix=cover ? *cover : (stream && !song.isCdda() ? Icons::self()->streamIcon : Icons::self()->albumIcon(constCoverSize)).pixmap(constCoverSize, constCoverSize);
}

#if QT_VERSION >= 0x050100
Expand Down
Loading

0 comments on commit 0b415b2

Please sign in to comment.