mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
magnifier: Clip child node to magnifier size
It's still broken in several other ways, but now one less.
This commit is contained in:
parent
6cfb720ab7
commit
64e128629f
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user