Items should be cleared when the node is discarded, not when the node's
children are discarded - which can also happen when a node is collapsed.
Fixes an error introduced in 9048e391b6Fixes#5681
In constrast to our other tests, these use
textures that are big enough to force slicing
with setting GSK_MAX_TEXTURE_SIZE, which we
will use in the following commits to improve
test coverage.
It is useless to have node files with references
to external files in the testsuite, so turn such
textures into data urls by doing a serialization
roundtrip.
No user knows that we have an internal function called
gtk_tree_list_row_destroy() that gets called when a row gets removed
from the treelistmodel.
So everyone was probably just making stuff up about what "destroy"
means.
Related: #5646
That way, we can return the item even after the row is removed. This is
particularly relevant in ListItemFactory::unbind callbacks because they
often use gtk_tree_list_row_get_item() and user code never tracks
changes to this property.
A side effect of this is that the item will survive until the row gets
destroyed, but that's what users expect anyway, so we can live with it.
Related: #5646
This is a good idea to avoid reentrancy problems when any child model
(or potentially more than one child model) has started emitting
items-changed but the emission hasn't arrived in this model yet.
At tat point, we'd get_item() the wrong item from those models.
We want to avoid such cases of reentrancy.
Related: #5646
We cheat and just set the texture parameters instead and hope nothing
explodes.
So far it didn't.
This is only needed to support GLES 2.0 so it's quite a limited set of
hardware these days.
Instead of uploading a texture once per filter, ensure textures are
uploaded as little as possible and use samplers instead to switch
different filters.
Sometimes we have to reupload a texture unfortunately, when it is an
external one and we want to create mipmaps.
When filtering changes for an already-cached
texture, we need to clear the render data
before setting the new one, otherwise it
does not take and we end up reuploading
the texture every frame.
Code above ensures that i is always in [0, n_columns - 1] range, so
the condition was always true, which resulted in filler tile always
being added to the grid. As the result, an empty row appeared at the
end of the grid if the number of columns divided the number of items.
Only add filler tile if last row is not full, i.e. when i > 0.
a11y: Fix the logic in gtk_accessible_get_next_accessible_sibling which decided whether we will use the overridden sibling on the context.
See merge request GNOME/gtk!5659
We were culling children based on the content box, but clipping via
overflow happens on the padding box, so we need to use that one instead.
Fixes issues with items not being visible / disappearing in Nautilus
when they are near the border.
Resolves#5380