summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-icon-container.c
diff options
context:
space:
mode:
authorCosimo Cecchi <[email protected]>2013-08-02 14:37:13 +0200
committerlukefromdc <[email protected]>2018-04-04 21:53:21 -0400
commitbc1405c9f54e19e74f973581130229ef1053ff9c (patch)
tree8ae544cad7a3b815ff6c48304ced204f37dd4947 /src/file-manager/fm-icon-container.c
parent779e0af4042b6572d729190067cfee6a876d73e5 (diff)
downloadcaja-bc1405c9f54e19e74f973581130229ef1053ff9c.tar.bz2
caja-bc1405c9f54e19e74f973581130229ef1053ff9c.tar.xz
Support HiDpi icons
Port the rendering of icons to cairo surfaces, so that we can apply the GDK scale factor when rendering icons. origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/0d4555d7
Diffstat (limited to 'src/file-manager/fm-icon-container.c')
-rw-r--r--src/file-manager/fm-icon-container.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/file-manager/fm-icon-container.c b/src/file-manager/fm-icon-container.c
index be3acee2..f744d65a 100644
--- a/src/file-manager/fm-icon-container.c
+++ b/src/file-manager/fm-icon-container.c
@@ -65,6 +65,7 @@ fm_icon_container_get_icon_images (CajaIconContainer *container,
gboolean use_embedding;
CajaFileIconFlags flags;
guint emblem_size;
+ gint scale;
file = (CajaFile *) data;
@@ -119,7 +120,9 @@ fm_icon_container_get_icon_images (CajaIconContainer *container,
flags |= CAJA_FILE_ICON_FLAGS_FOR_DRAG_ACCEPT;
}
- return caja_file_get_icon (file, size, flags);
+ scale = gtk_widget_get_scale_factor (GTK_WIDGET (icon_view));
+
+ return caja_file_get_icon (file, size, scale, flags);
}
static char *