diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2013-08-02 14:37:13 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2013-08-03 15:13:16 +0200 |
commit | 0d4555d76f86ba2d49f48836b7eea11f1adfb2fd (patch) | |
tree | d02fd7c18b591e1f623247b5aac9524b502ed2c3 /src/nautilus-canvas-view-container.c | |
parent | 9fd0032d2b4e44425941d1d8eb41b0d2c30a6527 (diff) | |
download | nautilus-0d4555d76f86ba2d49f48836b7eea11f1adfb2fd.tar.gz |
Support HiDpi icons
Port the rendering of icons to cairo surfaces, so that we can apply the
GDK scale factor when rendering icons.
Diffstat (limited to 'src/nautilus-canvas-view-container.c')
-rw-r--r-- | src/nautilus-canvas-view-container.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nautilus-canvas-view-container.c b/src/nautilus-canvas-view-container.c index 9498c898b..e786e4a5d 100644 --- a/src/nautilus-canvas-view-container.c +++ b/src/nautilus-canvas-view-container.c @@ -67,6 +67,7 @@ nautilus_canvas_view_container_get_icon_images (NautilusCanvasContainer *contain GIcon *emblemed_icon; GEmblem *emblem; GList *emblem_icons, *l; + gint scale; file = (NautilusFile *) data; @@ -92,7 +93,8 @@ nautilus_canvas_view_container_get_icon_images (NautilusCanvasContainer *contain flags |= NAUTILUS_FILE_ICON_FLAGS_FOR_DRAG_ACCEPT; } - icon_info = nautilus_file_get_icon (file, size, flags); + scale = gtk_widget_get_scale_factor (GTK_WIDGET (canvas_view)); + icon_info = nautilus_file_get_icon (file, size, scale, flags); emblem_icons = nautilus_file_get_emblem_icons (file); /* apply emblems */ @@ -112,7 +114,7 @@ nautilus_canvas_view_container_get_icon_images (NautilusCanvasContainer *contain } g_clear_object (&icon_info); - icon_info = nautilus_icon_info_lookup (emblemed_icon, size); + icon_info = nautilus_icon_info_lookup (emblemed_icon, size, scale); g_object_unref (pixbuf); g_object_unref (emblemed_icon); |