summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2022-01-02 12:41:05 +0000
committerAntónio Fernandes <antoniof@gnome.org>2022-01-05 12:56:32 +0000
commit177cc4cd4cfbc26bc6fa1900842649c76ca65534 (patch)
treeef2fca5c9136ccaa2a6e8152573434de6be524fd
parentd2e24efbf8c3d51a4e5bfa37a0557c13452b76b2 (diff)
downloadnautilus-177cc4cd4cfbc26bc6fa1900842649c76ca65534.tar.gz
properties-window: Set Image pixel size
GtkImage no longer sets an icon size on construction. Set a pixel size which matches the intrinsic size of the paintable.
-rw-r--r--src/nautilus-properties-window.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index a359a2101..6050683f2 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -456,6 +456,7 @@ update_properties_window_icon (NautilusPropertiesWindow *self)
{
g_autoptr (GdkPaintable) paintable = NULL;
g_autofree char *name = NULL;
+ gint pixel_size;
get_image_for_properties_window (self, &name, &paintable);
@@ -464,8 +465,13 @@ update_properties_window_icon (NautilusPropertiesWindow *self)
gtk_window_set_icon_name (GTK_WINDOW (self), name);
}
+ pixel_size = MAX (gdk_paintable_get_intrinsic_width (paintable),
+ gdk_paintable_get_intrinsic_width (paintable));
+
gtk_image_set_from_paintable (GTK_IMAGE (self->icon_image), paintable);
gtk_image_set_from_paintable (GTK_IMAGE (self->icon_button_image), paintable);
+ gtk_image_set_pixel_size (GTK_IMAGE (self->icon_image), pixel_size);
+ gtk_image_set_pixel_size (GTK_IMAGE (self->icon_button_image), pixel_size);
}
#if 0 && NAUTILUS_DND_NEEDS_GTK4_REIMPLEMENTATION