Smooth scale cover art for notifications, and display an empty album cover for tracks that have no artwork

This commit is contained in:
David Sansome 2010-02-28 01:03:13 +00:00
parent c811505d45
commit 6436c53705
4 changed files with 4 additions and 2 deletions

View File

@ -61,5 +61,6 @@
<file>open_stream.png</file>
<file>schema-1.sql</file>
<file>schema-2.sql</file>
<file>nocover.png</file>
</qresource>
</RCC>

BIN
data/nocover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -66,7 +66,8 @@ void OSD::ShowMessageNative(const QString& summary, const QString& message,
void OSD::ShowMessageNative(const QString& summary, const QString& message,
const QImage& image) {
#ifdef HAVE_LIBNOTIFY
QImage happy_gdk_image = image.convertToFormat(QImage::Format_RGB888).scaledToHeight(100);
QImage happy_gdk_image = image.scaledToHeight(100, Qt::SmoothTransformation)
.convertToFormat(QImage::Format_RGB888);
pixbuf_ = gdk_pixbuf_new_from_data(
happy_gdk_image.bits(),
GDK_COLORSPACE_RGB,

View File

@ -378,5 +378,5 @@ QImage Song::GetBestImage() const {
if (!d->art_automatic_.isEmpty())
return QImage(d->art_automatic_);
return QImage();
return QImage(":/nocover.png");
}