mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
stylecontext: Use new snapshot transforms
This commit is contained in:
parent
6df2023e9d
commit
380c4ece8d
@ -1901,25 +1901,27 @@ gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot,
|
||||
cursor1 = &weak_pos;
|
||||
}
|
||||
|
||||
gtk_snapshot_offset (snapshot, x + PANGO_PIXELS (cursor1->x), y + PANGO_PIXELS (cursor1->y));
|
||||
gtk_snapshot_save (snapshot);
|
||||
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x + PANGO_PIXELS (cursor1->x), y + PANGO_PIXELS (cursor1->y)));
|
||||
snapshot_insertion_cursor (snapshot,
|
||||
context,
|
||||
PANGO_PIXELS (cursor1->height),
|
||||
TRUE,
|
||||
direction,
|
||||
direction2 != PANGO_DIRECTION_NEUTRAL);
|
||||
gtk_snapshot_offset (snapshot, - x - PANGO_PIXELS (cursor1->x), - y - PANGO_PIXELS (cursor1->y));
|
||||
gtk_snapshot_restore (snapshot);
|
||||
|
||||
if (direction2 != PANGO_DIRECTION_NEUTRAL)
|
||||
{
|
||||
gtk_snapshot_offset (snapshot, x + PANGO_PIXELS (cursor2->x), y + PANGO_PIXELS (cursor2->y));
|
||||
gtk_snapshot_save (snapshot);
|
||||
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x + PANGO_PIXELS (cursor2->x), y + PANGO_PIXELS (cursor2->y)));
|
||||
snapshot_insertion_cursor (snapshot,
|
||||
context,
|
||||
PANGO_PIXELS (cursor2->height),
|
||||
FALSE,
|
||||
direction2,
|
||||
TRUE);
|
||||
gtk_snapshot_offset (snapshot, - x - PANGO_PIXELS (cursor2->x), - y - PANGO_PIXELS (cursor2->y));
|
||||
gtk_snapshot_restore (snapshot);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user