After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738162 - gnome-software raster broken when an app brings an icons which is not 64x64
gnome-software raster broken when an app brings an icons which is not 64x64
Status: VERIFIED FIXED
Product: gnome-software
Classification: Applications
Component: General
3.14.x
Other Linux
: Normal major
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-10-08 16:20 UTC by Dominique Leuenberger
Modified: 2014-10-10 15:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (52.54 KB, image/png)
2014-10-08 16:20 UTC, Dominique Leuenberger
Details

Description Dominique Leuenberger 2014-10-08 16:20:33 UTC
While in a perfect world, we could guarantee that all icons in the metadata is resized to 64x64, this is not the world we live in.

Also, appstream formally accepts 'remote' and 'local' paths to the icon (next to cached), where we have even less control over the sizes published.

The icons shown in gnome-software must be limited (in gnome-software) to be 64x64 (or 128x128 on hidpi)

Or we get pages like the one attached
Comment 1 Dominique Leuenberger 2014-10-08 16:20:51 UTC
Created attachment 288055 [details]
Screenshot
Comment 2 Dominique Leuenberger 2014-10-08 16:21:57 UTC
Kalev alreadt submitted something for that to g-s master (https://git.gnome.org/browse/gnome-software/commit/?id=a42fb263031cfc32503f926e2ff2b41e86d0d351 ) but in my tests at least, this is not functional; I did verify using gtk-inspector that the two flags are set, yet, to no avail (the screenshot taken is based on gnome-software/master of today)
Comment 3 Richard Hughes 2014-10-10 14:49:53 UTC
Hmm, this should do the right thing:

gs_image_set_from_pixbuf (GtkImage *image, const GdkPixbuf *pixbuf)
{
	gint scale;
	scale = gdk_pixbuf_get_width (pixbuf) / 64;
	gs_image_set_from_pixbuf_with_scale (image, pixbuf, scale);
}

What version g-s is this exactly? Could you retry with master pls?
Comment 4 Dominique Leuenberger 2014-10-10 14:56:07 UTC
tested with git-master-as-of-now (54d0b21d09e5a4ebc45118a54756d11b551b02ac)

Issue is not fixed.

the icon published in this repos metadata is
> file lipsofsuna.png 
lipsofsuna.png: PNG image data, 135 x 130, 8-bit/color RGBA, non-interlaced

(surely wrong.. but, as said, we simly can't in every case guarantee sane metadata)
Comment 5 Richard Hughes 2014-10-10 14:59:36 UTC
commit 63ea210340e2eae5ba716ede048df26e44145f4b
Author: Richard Hughes <richard@hughsie.com>
Date:   Fri Oct 10 15:59:02 2014 +0100

    Always load the fallback icon at 64x64 size
    
    This may be just a unmolested upstream icon or an SVG.
    
    Should resolve: https://bugzilla.gnome.org/show_bug.cgi?id=738162