The header in GtkColumnView has multiple event handlers
there is a ::pressed handler in GtkColumnView for
resizing the columns in CAPTURE as well as a motion
and drag controller. The ::release handler is in
GtkColumnViewTitle. We can't claim the event in the
existing handlers because then the ::release handler will
never get called. Currently, however, all clicks get propagated
to the ColumnView from the header which can be problematic.
Since we don't usually want the clicks from the header
handled on the view, claim it in the BUBBLE phase.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5425
gtk_widget_set_visible and gtk_window_present
are better alternatives, and calling gtk_widget_show
on newly created widgets is no longer necessary
anyway.
Make right-aligned content work in resized columns.
There is currently no way to make a title right-aligned,
but we can still make it work correctly. This is a follow
up to 7eb0ae39c5.
Fixes: #3276
Use the TREE_GRID, ROW, COLUMN_HEADER and GRID_CELL roles
for the various widgets involved in a GtkColumnView. To
enable this, we subclass GtkListView for the internal
list in the column view.
Just always tell the title and cell widgets to
clip their children to the right size. Otherwise
we risk things getting out of sync and unintended
overdraw.
Fixes: #3179
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.