Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Clasen
7eb0ae39c5 columview: Fix column resizing
We were not handling the fixed_width quite right,
and that was causing screaming from the GTK size
allocation machinery.

Fixes: #3178
2020-09-24 14:18:38 -04:00
Matthias Clasen
40f6a9d830 columnviewlayout: Handle for_size propertly
When we are given a for_size as width for the whole
column view, we need to distribute it over the columns
as gtk_column_view_allocate_columns would, in order
to find out which for_size to give to each cell.

This is a bit recursive, but works. Since we are
doing this recursion for every row, we should consider
adding a cache for those distributed widths.
2020-06-05 13:27:50 -04:00
Matthias Clasen
0f81b58545 columviewlayout: Skip children when we should
Every layout manager should call gtk_widget_should_layout
on their children before measuring or allocating them.
So do it here too.
2020-06-05 08:44:23 -04:00
Matthias Clasen
e637693131 columnviewlayout: Use header allocation for titles
Normally, this will be identical to the column
allocation, but we will temporarily change it
during column reordering.
2020-06-03 13:31:39 -04:00
Benjamin Otte
efcb3a9d67 columnview: Add header
This uses a custom GtkColumnViewTitle widget. So far that widget is
pretty boring, but that will change once we added
resizing, reordering, dnd, sorting, hiding/showing of columns or
whatever UIs we want.
2020-05-30 19:26:46 -04:00
Benjamin Otte
326cb1148b columnview: Add a custom LayoutManager
The ColumnView now allocates column widths first and then the individual
rows use the new layout manager which looks at the column allocations to
allocate their children.
2020-05-30 19:26:46 -04:00