Hi. I’m trying to port the thumbnails sidebar of Evince from GtkIconView to GtkGridview. But I can’t find any way to make GtkGridView scroll to certain list item. Is there any direct replacement of gtk_icon_view_scroll_to_path?
You can use the list.scroll-to-item
parametrised action:
/**
* GtkListBase|list.scroll-to-item:
* @position: position of item to scroll to
*
* Moves the visible area to the item given in @position with the minimum amount
* of scrolling required. If the item is already visible, nothing happens.
*/
And gtk_widget_activate_action()
to activate it, e.g.
gtk_widget_activate_action (grid_view,
"list.scroll-to-item",
"u",
row_index);
Thank you. It works except the scrolling animation is lost.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.