Merge branch 'wip/sadiq/fix-entry-magnifier' into 'gtk-3-24'

entry: Restrict magnifier popover within the entry size

See merge request GNOME/gtk!2228
This commit is contained in:
Matthias Clasen
2020-07-13 12:15:29 +00:00

View File

@ -4667,6 +4667,7 @@ gtk_entry_show_magnifier (GtkEntry *entry,
_gtk_magnifier_set_coords (GTK_MAGNIFIER (priv->magnifier), rect.x,
rect.y + rect.height / 2);
rect.x = CLAMP (rect.x, 0, allocation.width);
gtk_popover_set_pointing_to (GTK_POPOVER (priv->magnifier_popover),
&rect);
gtk_popover_popup (GTK_POPOVER (priv->magnifier_popover));