summaryrefslogtreecommitdiff
path: root/src/caja-property-browser.c
diff options
context:
space:
mode:
authorCosimo Cecchi <[email protected]>2013-08-02 14:37:13 +0200
committerraveit65 <[email protected]>2018-04-05 09:07:22 +0200
commit4bf67ac8fff8555bf784d8cd7e1611829a9fca44 (patch)
tree343275a74d64866035b0850d5583c83eb20fe486 /src/caja-property-browser.c
parent35c4dc6021f36a5fc7df94b0332c7e5d6fa00d0a (diff)
downloadcaja-4bf67ac8fff8555bf784d8cd7e1611829a9fca44.tar.bz2
caja-4bf67ac8fff8555bf784d8cd7e1611829a9fca44.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/caja-property-browser.c')
-rw-r--r--src/caja-property-browser.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/caja-property-browser.c b/src/caja-property-browser.c
index 09233e9c..90bcff16 100644
--- a/src/caja-property-browser.c
+++ b/src/caja-property-browser.c
@@ -722,6 +722,7 @@ make_drag_image (CajaPropertyBrowser *property_browser, const char* file_name)
char *icon_name;
gboolean is_reset;
CajaIconInfo *info;
+ gint icon_scale;
if (property_browser->details->category_type == CAJA_PROPERTY_EMBLEM)
{
@@ -739,7 +740,8 @@ make_drag_image (CajaPropertyBrowser *property_browser, const char* file_name)
else
{
icon_name = caja_emblem_get_icon_name_from_keyword (file_name);
- info = caja_icon_info_lookup_from_name (icon_name, CAJA_ICON_SIZE_STANDARD);
+ icon_scale = gtk_widget_get_scale_factor (GTK_WIDGET (property_browser->details->content_table));
+ info = caja_icon_info_lookup_from_name (icon_name, CAJA_ICON_SIZE_STANDARD, icon_scale);
pixbuf = caja_icon_info_get_pixbuf_at_size (info, CAJA_ICON_SIZE_STANDARD);
g_object_unref (info);
g_free (icon_name);
@@ -1795,6 +1797,7 @@ make_properties_from_directories (CajaPropertyBrowser *property_browser)
guint num_images;
char *path;
CajaIconInfo *info;
+ gint icon_scale;
g_return_if_fail (CAJA_IS_PROPERTY_BROWSER (property_browser));
g_return_if_fail (EEL_IS_IMAGE_TABLE (property_browser->details->content_table));
@@ -1807,6 +1810,7 @@ make_properties_from_directories (CajaPropertyBrowser *property_browser)
property_browser->details->keywords = NULL;
icons = caja_emblem_list_available ();
+ icon_scale = gtk_widget_get_scale_factor (GTK_WIDGET (property_browser->details->content_table));
property_browser->details->has_local = FALSE;
l = icons;
@@ -1830,7 +1834,7 @@ make_properties_from_directories (CajaPropertyBrowser *property_browser)
g_free (object_name);
continue;
}
- info = caja_icon_info_lookup_from_name (icon_name, CAJA_ICON_SIZE_STANDARD);
+ info = caja_icon_info_lookup_from_name (icon_name, CAJA_ICON_SIZE_STANDARD, icon_scale);
object_pixbuf = caja_icon_info_get_pixbuf_at_size (info, CAJA_ICON_SIZE_STANDARD);
object_label = g_strdup (caja_icon_info_get_display_name (info));
g_object_unref (info);