diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2010-12-01 00:55:14 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2010-12-04 15:39:52 +0100 |
commit | cf0bd12e6caf5cac37d7a25430d638d30fad7f39 (patch) | |
tree | d300e22620e844e915ac9c0a5d4475ace55b925b /gtk/gtkmenubar.c | |
parent | f7e7201f11a4a378eee491bde6ff26bbad558a8b (diff) | |
download | gtk+-cf0bd12e6caf5cac37d7a25430d638d30fad7f39.tar.gz |
GtkStyleProperties: Turn border-width into a GtkBorder property.
All current users of this CSS property have been updated to deal
with a GtkBorder.
Also a 0 border width has been set in the default CSS to ensure
GtkStyleContext and GtkThemingEngine always provide a non-NULL
pointer for this property.
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r-- | gtk/gtkmenubar.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index 2add10a5c8..bb482844d7 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -351,16 +351,17 @@ gtk_menu_bar_size_request (GtkWidget *widget, if (get_shadow_type (menu_bar) != GTK_SHADOW_NONE) { GtkStyleContext *context; - gint border_width; + GtkBorder *border; context = gtk_widget_get_style_context (widget); gtk_style_context_get (context, 0, - "border-width", &border_width, + "border-width", &border, NULL); - requisition->width += border_width * 2; - requisition->height += border_width * 2; + requisition->width += border->left + border->right; + requisition->height += border->top + border->bottom; + gtk_border_free (border); } } } @@ -436,15 +437,17 @@ gtk_menu_bar_size_allocate (GtkWidget *widget, if (get_shadow_type (menu_bar) != GTK_SHADOW_NONE) { GtkStyleContext *context; - gint border_width; + GtkBorder *border; context = gtk_widget_get_style_context (widget); gtk_style_context_get (context, 0, - "border-width", &border_width, + "border-width", &border, NULL); - child_allocation.x += border_width; - child_allocation.y += border_width; + child_allocation.x += border->left; + child_allocation.y += border->top; + + gtk_border_free (border); } if (priv->pack_direction == GTK_PACK_DIRECTION_LTR || |