toolbar: draw a full box for separators

This allows themes do whatever they want as separators, with
paddings, borders and backgrounds.

If "wide-separators" property is true, then, instead of just draw
a frame, also render its background, and take into account the
padding property for its limits.

https://bugzilla.gnome.org/show_bug.cgi?id=719713
This commit is contained in:
Jonh Wendell 2013-12-02 16:32:54 -02:00
parent 9a0064c684
commit 9d8a32b07d

View File

@ -3608,11 +3608,18 @@ _gtk_toolbar_paint_space_line (GtkWidget *widget,
NULL); NULL);
if (wide_separators) if (wide_separators)
gtk_render_frame (context, cr, {
(width - separator_width) / 2, gtk_render_background (context, cr,
height * start_fraction, (width - separator_width) / 2,
separator_width, padding.top,
height * (end_fraction - start_fraction)); separator_width,
height - padding.bottom);
gtk_render_frame (context, cr,
(width - separator_width) / 2,
padding.top,
separator_width,
height - padding.bottom);
}
else else
gtk_render_line (context, cr, gtk_render_line (context, cr,
(width - padding.left) / 2, (width - padding.left) / 2,
@ -3631,11 +3638,18 @@ _gtk_toolbar_paint_space_line (GtkWidget *widget,
NULL); NULL);
if (wide_separators) if (wide_separators)
gtk_render_frame (context, cr, {
width * start_fraction, gtk_render_background (context, cr,
(height - separator_height) / 2, padding.left,
width * (end_fraction - start_fraction), (height - separator_height) / 2,
separator_height); width - padding.right,
separator_height);
gtk_render_frame (context, cr,
padding.left,
(height - separator_height) / 2,
width - padding.right,
separator_height);
}
else else
gtk_render_line (context, cr, gtk_render_line (context, cr,
width * start_fraction, width * start_fraction,