style: Convert draw_flat_box vfunc to Cairo version

This commit is contained in:
Benjamin Otte
2010-08-16 21:50:08 +02:00
parent 8c325f0d60
commit bea727a142
3 changed files with 83 additions and 43 deletions

View File

@ -663,10 +663,9 @@ draw_box (GtkStyle *style,
static void
draw_flat_box (GtkStyle *style,
GdkWindow *window,
cairo_t *cr,
GtkStateType state,
GtkShadowType shadow,
GdkRectangle *area,
GtkWidget *widget,
const gchar *detail,
gint x,
@ -676,18 +675,15 @@ draw_flat_box (GtkStyle *style,
{
ThemeMatchData match_data;
g_return_if_fail(style != NULL);
g_return_if_fail(window != NULL);
match_data.function = TOKEN_D_FLAT_BOX;
match_data.detail = (gchar *)detail;
match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
match_data.shadow = shadow;
match_data.state = state;
if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
x, y, width, height))
parent_class->draw_flat_box (style, window, state, shadow, area, widget, detail,
parent_class->draw_flat_box (style, cr, state, shadow, widget, detail,
x, y, width, height);
}