+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):
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;
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));
"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 (
"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 (
"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 (