[glade] GtkImage: Fix icon size being reset
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GtkImage: Fix icon size being reset
- Date: Tue, 16 Jul 2019 01:35:58 +0000 (UTC)
commit 58285e64e3bc346393b4986dc0aa969f15495ac0
Author: James Westman <flyingpimonster flyingpimonster net>
Date: Mon Jul 15 14:34:45 2019 -0500
GtkImage: Fix icon size being reset
When you reloaded a file or changed the image type, the icon size was
reset (not in the sidebar, but in the editor).
plugins/gtk+/glade-gtk-image.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/plugins/gtk+/glade-gtk-image.c b/plugins/gtk+/glade-gtk-image.c
index 22cd3f98..3295ab1a 100644
--- a/plugins/gtk+/glade-gtk-image.c
+++ b/plugins/gtk+/glade-gtk-image.c
@@ -203,6 +203,10 @@ glade_gtk_image_set_property (GladeWidgetAdaptor *adaptor,
GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object,
id, value);
+
+ /* Set icon size back to what it should be */
+ if (!strcmp (id, "icon-name") || !strcmp (id, "stock"))
+ glade_property_sync (glade_widget_get_property (widget, "icon-size"));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]