diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-09-16 23:25:40 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-09-16 23:28:06 -0400 |
commit | bc17073a2580c27161be5c620a43f4fa44c98a50 (patch) | |
tree | c8bf12dff4fb3fb1adafd7eef6e8c41440daf567 /gtk/gtkmenubar.c | |
parent | af5ecd77e3f0d7f093a4a311bbf628980875ef36 (diff) | |
download | gtk+-bc17073a2580c27161be5c620a43f4fa44c98a50.tar.gz |
Move the gtk_shadow_type check down to gtk_render_frame
In gtk_menu_bar_draw, the check for shadow type != none
disables rendering of the background instead of the frame.
The check should be moved down to gtk_render_frame.
Patch by Peter de Ridder,
http://bugzilla.gnome.org/show_bug.cgi?id=670390
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r-- | gtk/gtkmenubar.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index 72b0b919e1..c4f7e9f0d6 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -639,16 +639,16 @@ gtk_menu_bar_draw (GtkWidget *widget, border = gtk_container_get_border_width (GTK_CONTAINER (widget)); context = gtk_widget_get_style_context (widget); + gtk_render_background (context, cr, + border, border, + gtk_widget_get_allocated_width (widget) - border * 2, + gtk_widget_get_allocated_height (widget) - border * 2); + if (get_shadow_type (GTK_MENU_BAR (widget)) != GTK_SHADOW_NONE) - gtk_render_background (context, cr, - border, border, - gtk_widget_get_allocated_width (widget) - border * 2, - gtk_widget_get_allocated_height (widget) - border * 2); - - gtk_render_frame (context, cr, - border, border, - gtk_widget_get_allocated_width (widget) - border * 2, - gtk_widget_get_allocated_height (widget) - border * 2); + gtk_render_frame (context, cr, + border, border, + gtk_widget_get_allocated_width (widget) - border * 2, + gtk_widget_get_allocated_height (widget) - border * 2); GTK_WIDGET_CLASS (gtk_menu_bar_parent_class)->draw (widget, cr); |