mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
textview: Update child allocations
This was accidentally lost when display line caching was introduced.
This commit is contained in:
parent
f90e7b9c56
commit
5cbc55578f
@ -2002,6 +2002,13 @@ allocate_child_widgets (GtkTextLayout *text_layout,
|
||||
pango_layout_iter_free (run_iter);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_layout_update_children (GtkTextLayout *text_layout,
|
||||
GtkTextLineDisplay *display)
|
||||
{
|
||||
allocate_child_widgets (text_layout, display);
|
||||
}
|
||||
|
||||
static void
|
||||
convert_color (GdkRGBA *result,
|
||||
PangoAttrColor *attr)
|
||||
@ -2663,6 +2670,8 @@ gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
if (tags != NULL)
|
||||
g_ptr_array_free (tags, TRUE);
|
||||
|
||||
display->has_children = saw_widget;
|
||||
|
||||
if (saw_widget)
|
||||
allocate_child_widgets (layout, display);
|
||||
|
||||
|
@ -214,13 +214,15 @@ struct _GtkTextLineDisplay
|
||||
GtkTextLine *line;
|
||||
|
||||
GdkRectangle block_cursor;
|
||||
|
||||
guint cursors_invalid : 1;
|
||||
guint has_block_cursor : 1;
|
||||
guint cursor_at_line_end : 1;
|
||||
guint size_only : 1;
|
||||
guint pg_bg_rgba_set : 1;
|
||||
guint has_children : 1;
|
||||
|
||||
GdkRGBA pg_bg_rgba;
|
||||
guint pg_bg_rgba_set : 1;
|
||||
};
|
||||
|
||||
#ifdef GTK_COMPILATION
|
||||
@ -337,6 +339,8 @@ GtkTextLineDisplay *gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
void gtk_text_layout_update_display_cursors (GtkTextLayout *layout,
|
||||
GtkTextLine *line,
|
||||
GtkTextLineDisplay *display);
|
||||
void gtk_text_layout_update_children (GtkTextLayout *layout,
|
||||
GtkTextLineDisplay *display);
|
||||
gboolean _gtk_text_layout_get_block_cursor (GtkTextLayout *layout,
|
||||
GdkRectangle *pos);
|
||||
gboolean gtk_text_layout_clamp_iter_to_vrange (GtkTextLayout *layout,
|
||||
|
@ -294,6 +294,9 @@ gtk_text_line_display_cache_get (GtkTextLineDisplayCache *cache,
|
||||
if (!size_only && display->line == cache->cursor_line)
|
||||
gtk_text_layout_update_display_cursors (layout, display->line, display);
|
||||
|
||||
if (!size_only && display->has_children)
|
||||
gtk_text_layout_update_children (layout, display);
|
||||
|
||||
/* Move to front of MRU */
|
||||
g_queue_unlink (&cache->mru, &display->mru_link);
|
||||
g_queue_push_head_link (&cache->mru, &display->mru_link);
|
||||
@ -322,6 +325,9 @@ gtk_text_line_display_cache_get (GtkTextLineDisplayCache *cache,
|
||||
if (line == cache->cursor_line)
|
||||
gtk_text_layout_update_display_cursors (layout, line, display);
|
||||
|
||||
if (display->has_children)
|
||||
gtk_text_layout_update_children (layout, display);
|
||||
|
||||
gtk_text_line_display_cache_take_display (cache,
|
||||
gtk_text_line_display_ref (display),
|
||||
layout);
|
||||
|
Loading…
Reference in New Issue
Block a user