mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-09 12:10:09 +00:00
treeview: always pixelcache widget contents
GtkTreeView has a particularly expensive drawing path. This can cause issues when part of animated widget sequences. Caching the content while a model is attached helps reduce the number of full redraws during exposure greatly. https://bugzilla.gnome.org/show_bug.cgi?id=751082
This commit is contained in:
parent
6a2143ab31
commit
fb06b6e4b8
@ -11540,6 +11540,8 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
|
||||
if (tree_view->priv->selection)
|
||||
_gtk_tree_selection_emit_changed (tree_view->priv->selection);
|
||||
|
||||
_gtk_pixel_cache_set_always_cache (tree_view->priv->pixel_cache, (model != NULL));
|
||||
|
||||
if (gtk_widget_get_realized (GTK_WIDGET (tree_view)))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (tree_view));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user