[gtk+/wip/baseline2] testbaseline: Test GtkEventBox



commit e240742d0affae5dbda381e2d98cf1574b394acd
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Mar 26 11:46:24 2013 +0100

    testbaseline: Test GtkEventBox

 tests/testbaseline.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/tests/testbaseline.c b/tests/testbaseline.c
index b1ddc98..94b4ee7 100644
--- a/tests/testbaseline.c
+++ b/tests/testbaseline.c
@@ -63,7 +63,7 @@ main (int    argc,
       char **argv)
 {
   GtkWidget *window, *label, *entry, *button, *grid, *notebook;
-  GtkWidget *vbox, *hbox, *grid_hbox, *spin, *spin2, *toggle, *combo, *image;
+  GtkWidget *vbox, *hbox, *grid_hbox, *spin, *spin2, *toggle, *combo, *image, *ebox;
   PangoFontDescription *font;
   GtkAdjustment *adjustment;
   int i, j;
@@ -178,11 +178,16 @@ main (int    argc,
          gtk_container_add (GTK_CONTAINER (hbox), button);
        }
 
+      ebox = gtk_event_box_new ();
+      if (j == 0)
+       gtk_widget_set_valign (ebox, GTK_ALIGN_BASELINE);
+      gtk_container_add (GTK_CONTAINER (hbox), ebox);
+
       image = gtk_image_new_from_icon_name ("face-sad", GTK_ICON_SIZE_BUTTON);
       gtk_image_set_pixel_size (GTK_IMAGE (image), 34);
       if (j == 0)
        gtk_widget_set_valign (image, GTK_ALIGN_BASELINE);
-      gtk_container_add (GTK_CONTAINER (hbox), image);
+      gtk_container_add (GTK_CONTAINER (ebox), image);
 
       button = gtk_toggle_button_new_with_label ("│Xyj,Ö");
       if (j == 0)


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