listview: Allocate rubberband at end of size_allocate()

Otherwise the rubberband uses the wrong scroll offsets.
This commit is contained in:
Benjamin Otte
2020-06-26 02:55:53 +02:00
parent 7c52e03815
commit ec4a489093
2 changed files with 4 additions and 4 deletions

View File

@@ -716,8 +716,6 @@ gtk_grid_view_size_allocate (GtkWidget *widget,
int x, y;
guint i;
gtk_list_base_allocate_rubberband (GTK_LIST_BASE (widget));
orientation = gtk_list_base_get_orientation (GTK_LIST_BASE (self));
scroll_policy = gtk_list_base_get_scroll_policy (GTK_LIST_BASE (self), orientation);
opposite_orientation = OPPOSITE_ORIENTATION (orientation);
@@ -877,6 +875,8 @@ gtk_grid_view_size_allocate (GtkWidget *widget,
}
}
}
gtk_list_base_allocate_rubberband (GTK_LIST_BASE (widget));
}
static void

View File

@@ -567,8 +567,6 @@ gtk_list_view_size_allocate (GtkWidget *widget,
GtkOrientation orientation, opposite_orientation;
GtkScrollablePolicy scroll_policy;
gtk_list_base_allocate_rubberband (GTK_LIST_BASE (self));
orientation = gtk_list_base_get_orientation (GTK_LIST_BASE (self));
opposite_orientation = OPPOSITE_ORIENTATION (orientation);
scroll_policy = gtk_list_base_get_scroll_policy (GTK_LIST_BASE (self), orientation);
@@ -658,6 +656,8 @@ gtk_list_view_size_allocate (GtkWidget *widget,
y += row->height * row->parent.n_items;
}
gtk_list_base_allocate_rubberband (GTK_LIST_BASE (self));
}
static void