magnifier: Clip child node to magnifier size

It's still broken in several other ways, but now one less.
This commit is contained in:
Timm Bäder 2018-03-16 21:30:31 +01:00
parent 6cfb720ab7
commit 64e128629f

View File

@ -125,12 +125,20 @@ gtk_magnifier_snapshot (GtkWidget *widget,
if (inspected_node != NULL)
{
gtk_snapshot_push_clip (snapshot,
&GRAPHENE_RECT_INIT (0, 0,
gtk_widget_get_width (widget),
gtk_widget_get_height (widget)),
"MagnifierClip");
graphene_matrix_init_identity (&transform);
graphene_matrix_scale (&transform, priv->magnification, priv->magnification, 1);
gtk_snapshot_push_transform (snapshot, &transform, "Magnifier transform");
gtk_snapshot_append_node (snapshot, inspected_node);
gtk_snapshot_pop (snapshot);
gtk_snapshot_pop (snapshot);
}