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 790287 - gtk+4, GtkWindow: icon_from_list() does not scale down large icons
gtk+4, GtkWindow: icon_from_list() does not scale down large icons
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.92.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-11-13 11:46 UTC by Kjell Ahlstedt
Modified: 2017-11-26 23:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch: GtkWindow: Fix the down-scaling in icon_from_list() (1.17 KB, patch)
2017-11-13 11:51 UTC, Kjell Ahlstedt
committed Details | Review

Description Kjell Ahlstedt 2017-11-13 11:46:36 UTC
There are two errors in icon_from_list() that make it fail to scale down a
large icon as intended.

In the division size / gdk_texture_get_width(texture), both operands are
integers and size < gdk_texture_get_width(texture). The result is 0.

cairo_set_source_surface() must be called after cairo_scale().
Comment 1 Kjell Ahlstedt 2017-11-13 11:51:09 UTC
Created attachment 363497 [details] [review]
patch: GtkWindow: Fix the down-scaling in icon_from_list()