Smooth scale cover art for notifications, and display an empty album cover for tracks that have no artwork
This commit is contained in:
parent
c811505d45
commit
6436c53705
|
@ -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>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
|
@ -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,
|
||||
|
|
|
@ -378,5 +378,5 @@ QImage Song::GetBestImage() const {
|
|||
if (!d->art_automatic_.isEmpty())
|
||||
return QImage(d->art_automatic_);
|
||||
|
||||
return QImage();
|
||||
return QImage(":/nocover.png");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue