gridview: Fix condition for adding filler tiles
authorАлексей Шилин <a.i.shilin@yandex.ru>
Thu, 16 Mar 2023 21:21:09 +0000 (00:21 +0300)
committerАлексей Шилин <a.i.shilin@yandex.ru>
Thu, 16 Mar 2023 21:21:09 +0000 (00:21 +0300)
commit65b6150e787a5ba278dd2ef5bccee97b0049af37
tree3ec58515f958bdd8a47a23be60d36aa8e0a5ca35
parentcf332e2efac6ad7acef72eef84221081c7d7aa17
gridview: Fix condition for adding filler tiles

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.
gtk/gtkgridview.c