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 757590 - icon-utils: Add a for_scale() variant for gd_create_symbolic_icon
icon-utils: Add a for_scale() variant for gd_create_symbolic_icon
Status: RESOLVED FIXED
Product: libgd
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: libgd maintainer(s)
libgd maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-11-04 14:18 UTC by Debarshi Ray
Modified: 2015-11-04 18:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
icon-utils: Fix annotation (598 bytes, patch)
2015-11-04 14:19 UTC, Debarshi Ray
committed Details | Review
icon-utils: Add a for_scale() variant for gd_create_symbolic_icon (4.53 KB, patch)
2015-11-04 14:20 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-11-04 14:18:28 UTC
It is incorrect to call gtk_icon_theme_lookup_by_gicon with a size multiplied by the scaling factor because the NxN@2 assets might be different from the 2Nx2N assets.

In practice, it doesn't make a lot of difference in gnome-documents because we are using symbolics and the shapes are reasonably simple. However, gnome-photos' fork of the code uses a constant size for the emblem [1][2], instead of calculating it from the base_size, and not knowing the scale results in smaller emblems on HiDpi.

So, other than being the right thing to do, it will help in re-uniting the fork. 

[1] https://git.gnome.org/browse/gnome-photos/commit/?id=2511cc5bb1ab5
[2] https://git.gnome.org/browse/gnome-photos/commit/?id=0cc1d70340553
Comment 1 Debarshi Ray 2015-11-04 14:19:32 UTC
Created attachment 314818 [details] [review]
icon-utils: Fix annotation
Comment 2 Debarshi Ray 2015-11-04 14:20:18 UTC
Created attachment 314819 [details] [review]
icon-utils: Add a for_scale() variant for gd_create_symbolic_icon
Comment 3 Cosimo Cecchi 2015-11-04 17:17:13 UTC
Review of attachment 314818 [details] [review]:

OK
Comment 4 Cosimo Cecchi 2015-11-04 17:18:35 UTC
Review of attachment 314819 [details] [review]:

Thanks, looks good to me.
Comment 5 Debarshi Ray 2015-11-04 18:30:15 UTC
Thanks, Cosimo.