summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-10-15 14:41:40 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-10-15 14:42:43 -0400
commit0bd5a96d71562c4820cf74fdc05ce5c891936bad (patch)
treec499556d61f436cb955061c773d0d8ee1e93eedb /demos
parent7d22616a0efc19f7ff0c52a361fa1807860ca7b3 (diff)
downloadgtk+-0bd5a96d71562c4820cf74fdc05ce5c891936bad.tar.gz
gtk-demo: Fix some issues with the multi view demo
The nested window was not modal, causing it to be inoperable. And the nested views within were all shrunk down to nothingness. Give them some width. Fixes: #3257
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/textview.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index 42c0f6636f..e117d7a635 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -545,6 +545,7 @@ recursive_attach_view (int depth,
return;
child_view = gtk_text_view_new_with_buffer (gtk_text_view_get_buffer (view));
+ gtk_widget_set_size_request (child_view, 260 - 20 * depth, -1);
/* Frame is to add a black border around each child view */
frame = gtk_frame_new (NULL);
@@ -590,6 +591,8 @@ easter_egg_callback (GtkWidget *button,
g_object_unref (buffer);
window = gtk_window_new ();
+ gtk_window_set_transient_for (window, GTK_WINDOW (gtk_widget_get_root (button)));
+ gtk_window_set_modal (window, TRUE);
sw = gtk_scrolled_window_new ();
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,