- _cairo_round_rectangle_sides (cr, (gdouble) radius,
- x + d1, y + d1,
- width - d2, height - d2,
- (SIDE_TOP | SIDE_LEFT) & ~(hidden_side),
- junction);
- cairo_stroke (cr);
+ /* Bottom/right */
+ if (border_style == GTK_BORDER_STYLE_INSET)
+ gdk_cairo_set_source_rgba (cr, &lighter);
+ else
+ gdk_cairo_set_source_rgba (cr, &border_color);
+
+ _cairo_uneven_frame (cr, &border_radius,
+ x, y, width, height,
+ &border);
+ cairo_fill (cr);
+
+ /* Top/left */
+ cairo_move_to (cr, x, y);
+ cairo_line_to (cr, x + width, y);
+ cairo_line_to (cr,
+ x + width - border.right - border_radius.top_right.horizontal / 2,
+ y + border.top + border_radius.top_right.vertical / 2);
+ cairo_line_to (cr,
+ x + width - border.right - border_radius.bottom_right.horizontal / 2,
+ y + height - border.bottom - border_radius.bottom_right.vertical / 2);
+ cairo_line_to (cr,
+ x + border.left + border_radius.bottom_left.horizontal / 2,
+ y + height - border.bottom - border_radius.bottom_left.vertical / 2);
+ cairo_line_to (cr, x, y + height);
+ cairo_close_path (cr);
+
+ cairo_clip (cr);
+
+ if (border_style == GTK_BORDER_STYLE_INSET)
+ gdk_cairo_set_source_rgba (cr, &border_color);
+ else
+ gdk_cairo_set_source_rgba (cr, &lighter);
+
+ _cairo_uneven_frame (cr, &border_radius,
+ x, y, width, height,
+ &border);
+ cairo_fill (cr);
+ cairo_restore (cr);
+ }