Commit 2a89189f authored by Sebastian Keller's avatar Sebastian Keller

textview: Use correct aspect ratio when invaldiating cursor

The size of the cursor depends on either the gtk-cursor-aspect-ratio
GtkSetting or as of the previous commit on the GtkSetting or the
cursor-aspect-ratio style property. GtkTextView was only considering the
style property.

Related: #3441
parent 0165cce6
......@@ -10258,9 +10258,17 @@ text_window_invalidate_cursors (GtkTextWindow *win)
draw_arrow = (strong.x != weak.x || strong.y != weak.y);
gtk_widget_style_get (win->widget,
"cursor-aspect-ratio", &cursor_aspect_ratio,
g_object_get (gtk_widget_get_settings (win->widget),
"gtk-cursor-aspect-ratio", &cursor_aspect_ratio,
/* Fall back to style property if the GtkSetting property is unchanged */
if (cursor_aspect_ratio == 0.04f)
gtk_widget_style_get (win->widget,
"cursor-aspect-ratio", &cursor_aspect_ratio,
stem_width = strong.height * cursor_aspect_ratio + 1;
arrow_width = stem_width + 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment