Commit 163d32ee authored by Matthias Clasen's avatar Matthias Clasen

docs: Work around GtkPicture growing

Make the GtkPicture gallery image stay within its
limits, by overpowering its request mode.
parent b7728a88
docs/reference/gtk/images/picture.png

6.92 KB | W: | H:

docs/reference/gtk/images/picture.png

6.1 KB | W: | H:

docs/reference/gtk/images/picture.png
docs/reference/gtk/images/picture.png
docs/reference/gtk/images/picture.png
docs/reference/gtk/images/picture.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -1067,6 +1067,7 @@ create_picture (void)
GtkWidget *vbox;
GtkIconTheme *theme;
GdkPaintable *paintable;
GtkWidget *box;
theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
paintable = GDK_PAINTABLE (gtk_icon_theme_lookup_icon (theme,
......@@ -1080,8 +1081,12 @@ create_picture (void)
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_append (GTK_BOX (box), g_object_new (GTK_TYPE_IMAGE, "hexpand", TRUE, NULL));
gtk_box_append (GTK_BOX (box), widget);
gtk_box_append (GTK_BOX (box), g_object_new (GTK_TYPE_IMAGE, "hexpand", TRUE, NULL));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_box_append (GTK_BOX (vbox), widget);
gtk_box_append (GTK_BOX (vbox), box);
gtk_box_append (GTK_BOX (vbox), gtk_label_new ("Picture"));
add_margin (vbox);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment