gtktextview: Set magnifier popover on top

At the bottom, it sometimes has to fight for the same position than
text handles, besides might not be ergonomically convenient (eg.
finger/hand partly covering the popover). Move it at the top to fix
both.
This commit is contained in:
Carlos Garnacho
2020-03-20 12:23:03 +01:00
parent 54a4a18bcf
commit 23f03ca1f2

View File

@@ -1884,6 +1884,7 @@ _gtk_text_view_ensure_magnifier (GtkTextView *text_view)
priv->magnifier = _gtk_magnifier_new (GTK_WIDGET (text_view));
_gtk_magnifier_set_magnification (GTK_MAGNIFIER (priv->magnifier), 2.0);
priv->magnifier_popover = gtk_popover_new ();
gtk_popover_set_position (GTK_POPOVER (priv->magnifier_popover), GTK_POS_TOP);
gtk_widget_set_parent (priv->magnifier_popover, GTK_WIDGET (text_view));
gtk_widget_add_css_class (priv->magnifier_popover, "magnifier");
gtk_popover_set_autohide (GTK_POPOVER (priv->magnifier_popover), FALSE);