diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 1dd0576ae7..a96395ca46 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -2916,6 +2916,14 @@ gtk_render_insertion_cursor (GtkStyleContext *context, "gtk-cursor-aspect-ratio", &aspect_ratio, NULL); + /* Fall back to style property if the GtkSetting property is unchanged */ + if (aspect_ratio == 0.04f) + { + gtk_style_context_get_style (context, + "cursor-aspect-ratio", &aspect_ratio, + NULL); + } + keymap_direction = gdk_keymap_get_direction (gdk_keymap_get_for_display (gdk_screen_get_display (priv->screen))); pango_layout_get_cursor_pos (layout, index, &strong_pos, &weak_pos); @@ -3003,6 +3011,14 @@ gtk_draw_insertion_cursor (GtkWidget *widget, "gtk-cursor-aspect-ratio", &aspect_ratio, NULL); + /* Fall back to style property if the GtkSetting property is unchanged */ + if (aspect_ratio == 0.04f) + { + gtk_style_context_get_style (context, + "cursor-aspect-ratio", &aspect_ratio, + NULL); + } + draw_insertion_cursor (context, cr, location->x, location->y, location->height, aspect_ratio,