listview: Allow starting rubberband in empty space below last row
Rubberband does not work when initiated past the last row (warning is printed "Could not start rubberbanding: No item). Clamp y at the max height of the widgets in the listview
This commit is contained in:
@@ -428,6 +428,8 @@ gtk_list_view_get_position_from_allocation (GtkListBase *base,
|
|||||||
if (across >= self->list_width)
|
if (across >= self->list_width)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
along = CLAMP (along, 0, gtk_list_view_get_list_height (self) - 1);
|
||||||
|
|
||||||
row = gtk_list_view_get_row_at_y (self, along, &remaining);
|
row = gtk_list_view_get_row_at_y (self, along, &remaining);
|
||||||
if (row == NULL)
|
if (row == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user