* src/hildon-app-menu.c (hildon_app_menu_class_init): New inner-border style property...
authorAlberto Garcia <agarcia@igalia.com>
Thu, 12 Jun 2008 10:05:54 +0000 (10:05 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Thu, 12 Jun 2008 10:05:54 +0000 (10:05 +0000)
* examples/hildon-app-menu-example.c
(create_menu):
Don't set the menu border explicitly, now we have the inner-border
style property for that.

ChangeLog
examples/hildon-app-menu-example.c
src/hildon-app-menu.c

index 3166780..a15f147 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2008-06-12  Alberto Garcia  <agarcia@igalia.com>
+
+       * src/hildon-app-menu.c
+       (hildon_app_menu_class_init):
+       New inner-border style property.
+       Set all default spacings to 16
+       (hildon_app_menu_init):
+       Use vertical-spacing to set the space between filter buttons and
+       regular menu buttons.
+       Set the default container border using the inner-border value.
+
+       * examples/hildon-app-menu-example.c
+       (create_menu):
+       Don't set the menu border explicitly, now we have the inner-border
+       style property for that.
+
 2008-06-11  Alberto Garcia  <agarcia@igalia.com>
 
        * src/hildon-app-menu.c (hildon_app_menu_init):
index c7c3c92..c72ad66 100644 (file)
@@ -78,8 +78,6 @@ create_menu                                     (GtkWidget *label)
     hildon_app_menu_add_filter (menu, GTK_BUTTON (button), group);
     gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
 
-    gtk_container_set_border_width (GTK_CONTAINER (menu), 30);
-
     return menu;
 }
 
index 874093a..0f07d04 100644 (file)
@@ -354,19 +354,20 @@ hildon_app_menu_init                            (HildonAppMenu *menu)
     GdkScreen *screen;
     int width;
     guint filter_group_spacing, horizontal_spacing, vertical_spacing,
-            external_border;
+            inner_border, external_border;
     HildonAppMenuPrivate *priv = HILDON_APP_MENU_GET_PRIVATE(menu);
 
     gtk_widget_style_get (GTK_WIDGET (menu),
                           "filter-group-spacing", &filter_group_spacing,
                           "horizontal-spacing", &horizontal_spacing,
                           "vertical-spacing", &vertical_spacing,
+                          "inner-border", &inner_border,
                           "external-border", &external_border,
                           NULL);
 
     /* Initialize private variables */
     priv->filters_hbox = GTK_BOX (gtk_hbox_new (FALSE, filter_group_spacing));
-    priv->vbox = GTK_BOX (gtk_vbox_new (FALSE, 10));
+    priv->vbox = GTK_BOX (gtk_vbox_new (FALSE, vertical_spacing));
     priv->table = GTK_TABLE (gtk_table_new (1, 2, TRUE));
     priv->sizegroup = GTK_SIZE_GROUP (gtk_size_group_new (GTK_SIZE_GROUP_BOTH));
     priv->nitems = 0;
@@ -390,6 +391,9 @@ hildon_app_menu_init                            (HildonAppMenu *menu)
     width = gdk_screen_get_width (screen) - external_border * 2;
     gtk_window_set_default_size (GTK_WINDOW (menu), width, -1);
 
+    /* Set inner border */
+    gtk_container_set_border_width (GTK_CONTAINER (menu), inner_border);
+
     gtk_window_set_modal (GTK_WINDOW (menu), TRUE);
 
     gtk_widget_show_all (GTK_WIDGET (priv->vbox));
@@ -428,7 +432,7 @@ hildon_app_menu_class_init                      (HildonAppMenuClass *klass)
             "filter-group-spacing",
             "Space between filter groups",
             "Space in pixels between the filter groups",
-            0, G_MAXUINT, 10,
+            0, G_MAXUINT, 16,
             G_PARAM_READABLE));
 
     gtk_widget_class_install_style_property (
@@ -437,7 +441,7 @@ hildon_app_menu_class_init                      (HildonAppMenuClass *klass)
             "horizontal-spacing",
             "Horizontal spacing on menu items",
             "Horizontal spacing between each menu item (but not filters)",
-            0, G_MAXUINT, 10,
+            0, G_MAXUINT, 16,
             G_PARAM_READABLE));
 
     gtk_widget_class_install_style_property (
@@ -446,7 +450,16 @@ hildon_app_menu_class_init                      (HildonAppMenuClass *klass)
             "vertical-spacing",
             "Vertical spacing on menu items",
             "Vertical spacing between each menu item (but not filters)",
-            0, G_MAXUINT, 10,
+            0, G_MAXUINT, 16,
+            G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property (
+        widget_class,
+        g_param_spec_uint (
+            "inner-border",
+            "Border between menu edges and buttons",
+            "Border between menu edges and buttons",
+            0, G_MAXUINT, 16,
             G_PARAM_READABLE));
 
     gtk_widget_class_install_style_property (