forked from AuroraMiddleware/gtk
columnview: Fix more issues with column resizing
Make it so that for overlapping resize rectangles (with very narrow columns), we prefer the narrow column, so you can regrow a column after shrinking it all the way. Related: #3274
This commit is contained in:
parent
a88e5a5f4e
commit
39baf4fff4
@ -906,7 +906,7 @@ header_drag_begin (GtkGestureDrag *gesture,
|
||||
self->drag_pos = -1;
|
||||
|
||||
n = g_list_model_get_n_items (G_LIST_MODEL (self->columns));
|
||||
for (i = 0; !self->in_column_resize && i < n; i++)
|
||||
for (i = n - 1; !self->in_column_resize && i >= 0; i--)
|
||||
{
|
||||
GtkColumnViewColumn *column = g_list_model_get_item (G_LIST_MODEL (self->columns), i);
|
||||
|
||||
@ -936,6 +936,17 @@ header_drag_begin (GtkGestureDrag *gesture,
|
||||
g_object_unref (column);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; !self->in_column_resize && i < n; i++)
|
||||
{
|
||||
GtkColumnViewColumn *column = g_list_model_get_item (G_LIST_MODEL (self->columns), i);
|
||||
|
||||
if (!gtk_column_view_column_get_visible (column))
|
||||
{
|
||||
g_object_unref (column);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gtk_column_view_get_reorderable (self) &&
|
||||
gtk_column_view_in_header (self, column, start_x, start_y))
|
||||
|
Loading…
Reference in New Issue
Block a user