[gtk+/gtk-3-22] testpopover: Use HeaderBar to get CSD decorations

commit 3a2c379f3c891106cf4b6e587e41e93a5e15a59f
Author: Daniel Boles <dboles src gnome org>
Date:   Sun Aug 13 20:15:36 2017 +0100

    testpopover: Use HeaderBar to get CSD decorations
    This helps test whether the Popover positioning gets messed up by the
    presence of CSD shadow or other accessories around the content area.

 tests/testpopover.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tests/testpopover.c b/tests/testpopover.c
index 5c9e77f..addba18 100644
--- a/tests/testpopover.c
+++ b/tests/testpopover.c
@@ -47,11 +47,16 @@ main (int argc, char *argv[])
   GtkWidget *label;
   GtkWidget *check;
   GtkWidget *combo;
+  GtkWidget *header_bar;
   gtk_init (&argc, &argv);
   win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_window_set_default_size (GTK_WINDOW (win), 400, 600);
+  header_bar = gtk_header_bar_new ();
+  gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (header_bar), TRUE);
+  gtk_window_set_titlebar (GTK_WINDOW (win), header_bar);
+  gtk_window_set_title (GTK_WINDOW (win), "Test GtkPopover");
   actions = g_simple_action_group_new ();
   g_action_map_add_action_entries (G_ACTION_MAP (actions), entries, G_N_ELEMENTS (entries), NULL);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]