GtkThemingEngine: Cairo-ify frame_gap rendering from GtkStyle.

This commit is contained in:
Carlos Garnacho 2010-07-19 11:58:13 +02:00
parent 7d2b51f147
commit 8771f46dae

View File

@ -1372,29 +1372,30 @@ gtk_theming_engine_render_frame_gap (GtkThemingEngine *engine,
else else
sides = SIDE_BOTTOM | SIDE_RIGHT; sides = SIDE_BOTTOM | SIDE_RIGHT;
if (gap_side == GTK_POS_RIGHT || gdk_cairo_set_source_color (cr, &darker);
gap_side == GTK_POS_BOTTOM) add_path_rectangle_sides (cr, x + 1, y, width - 2, height, sides);
add_path_gap_side (cr, gap_side, 0, add_path_rectangle_sides (cr, x, y + 1, width, height - 2, sides);
x, y, width, height, cairo_stroke (cr);
xy0_gap, xy1_gap);
add_path_rounded_rectangle (cr, 0, sides,
x, y, width, height);
cairo_set_source_rgb (cr, 0, 0, 0); cairo_set_source_rgb (cr, 0, 0, 0);
add_path_rectangle_sides (cr, x, y, width, height, sides);
cairo_stroke (cr); cairo_stroke (cr);
if (gap_side == GTK_POS_RIGHT || if (gap_side == GTK_POS_RIGHT ||
gap_side == GTK_POS_BOTTOM) gap_side == GTK_POS_BOTTOM)
add_path_gap_side (cr, gap_side, 0, {
x, y, width, height, gdk_cairo_set_source_color (cr, &darker);
xy0_gap, xy1_gap); add_path_gap_side (cr, gap_side,
x, y, width - 2, height - 2,
xy0_gap, xy1_gap);
cairo_stroke (cr);
add_path_rounded_rectangle (cr, 0, sides, cairo_set_source_rgb (cr, 0, 0, 0);
x, y, width - 1, height - 1); add_path_gap_side (cr, gap_side,
x, y, width - 1, height - 1,
gdk_cairo_set_source_color (cr, &darker); xy0_gap, xy1_gap);
cairo_stroke (cr); cairo_stroke (cr);
}
if (gap_side == GTK_POS_LEFT) if (gap_side == GTK_POS_LEFT)
sides = SIDE_TOP; sides = SIDE_TOP;
@ -1403,18 +1404,20 @@ gtk_theming_engine_render_frame_gap (GtkThemingEngine *engine,
else else
sides = SIDE_TOP | SIDE_LEFT; sides = SIDE_TOP | SIDE_LEFT;
if (gap_side == GTK_POS_TOP ||
gap_side == GTK_POS_LEFT)
add_path_gap_side (cr, gap_side, 0,
x, y, width, height,
xy0_gap, xy1_gap);
add_path_rounded_rectangle (cr, 0, sides,
x, y, width, height);
gdk_cairo_set_source_color (cr, &lighter); gdk_cairo_set_source_color (cr, &lighter);
add_path_rectangle_sides (cr, x, y, width, height, sides);
cairo_stroke (cr); cairo_stroke (cr);
if (gap_side == GTK_POS_LEFT ||
gap_side == GTK_POS_TOP)
{
add_path_gap_side (cr, gap_side,
x, y, width, height,
xy0_gap, xy1_gap);
cairo_stroke (cr);
}
cairo_restore (cr); cairo_restore (cr);
gdk_color_free (bg_color); gdk_color_free (bg_color);