gadget: Fix handling of custom content

The transformations here were wrong, causing content to go nowhere.
This patch fixes check and radio buttons to appear as expected.
This commit is contained in:
Matthias Clasen 2016-08-06 20:02:49 -04:00 committed by Emmanuele Bassi
parent 6a1edb0960
commit 1046262048

View File

@ -909,7 +909,7 @@ gtk_css_gadget_get_render_node (GtkCssGadget *gadget,
graphene_point3d_t tmp; graphene_point3d_t tmp;
graphene_matrix_init_translate (&content_transform, graphene_matrix_init_translate (&content_transform,
graphene_point3d_init (&tmp, -contents_x, -contents_y, 0)); graphene_point3d_init (&tmp, contents_x, contents_y, 0));
/* If there's an override in place, create a temporary node */ /* If there's an override in place, create a temporary node */
if (gadget_class->has_content (gadget)) if (gadget_class->has_content (gadget))
@ -925,7 +925,7 @@ gtk_css_gadget_get_render_node (GtkCssGadget *gadget,
/* Compatibility mode: draw_focus is left to the draw() implementation */ /* Compatibility mode: draw_focus is left to the draw() implementation */
draw_focus = gadget_class->draw (gadget, cr, draw_focus = gadget_class->draw (gadget, cr,
contents_x, contents_y, 0, 0,
contents_width, contents_height); contents_width, contents_height);
g_free (str); g_free (str);