diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-12-02 19:13:24 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-12-02 21:00:24 -0500 |
commit | 6f10ed2711646b103c2994fef4677337f47a0298 (patch) | |
tree | 0094fa04e85a3cf864c2b40adcf7739ce2b2c982 /examples/action-namespace.c | |
parent | 37a1e6cacb46bb7156da4a4ac90780ed2a986b20 (diff) | |
download | gtk+-6f10ed2711646b103c2994fef4677337f47a0298.tar.gz |
Improve action-namespace example
This needs to have some space around the button for the popover
to show up.
Diffstat (limited to 'examples/action-namespace.c')
-rw-r--r-- | examples/action-namespace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/action-namespace.c b/examples/action-namespace.c index 16d48cb64d..7335ad993e 100644 --- a/examples/action-namespace.c +++ b/examples/action-namespace.c @@ -81,6 +81,7 @@ activate (GApplication *app, return; win = gtk_application_window_new (GTK_APPLICATION (app)); + gtk_window_set_default_size (GTK_WINDOW (win), 200, 300); doc_actions = g_simple_action_group_new (); g_action_map_add_action_entries (G_ACTION_MAP (doc_actions), doc_entries, G_N_ELEMENTS (doc_entries), win); @@ -110,7 +111,8 @@ activate (GApplication *app, gtk_button_set_label (GTK_BUTTON (button), "Menu"); gtk_widget_insert_action_group (button, "doc", G_ACTION_GROUP (doc_actions)); gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), G_MENU_MODEL (button_menu)); - + gtk_widget_set_halign (GTK_WIDGET (button), GTK_ALIGN_CENTER); + gtk_widget_set_valign (GTK_WIDGET (button), GTK_ALIGN_START); gtk_container_add (GTK_CONTAINER (win), button); gtk_container_set_border_width (GTK_CONTAINER (win), 12); gtk_widget_show_all (win); |