Re: Scrolling to a GtkListBoxRow after adding it to a GtkListBox

2018-04-16 Thread Michael Gratton
On Sun, Apr 15, 2018 at 1:05 PM, "Matthew A. Postiff" wrote: Is the issue that the widget is not yet drawn, so it size/location coords are not settled yet? I originally thought so, but when it occurred it looked like it was actually be correctly getting scrolled to but then scrolled away ag

Re: Scrolling to a GtkListBoxRow after adding it to a GtkListBox

2018-04-15 Thread Eric Cashon via gtk-app-devel-list
" Is the issue that the widget is not yet drawn, so it size is not settled yet? Total guesses: What about using g_signal_connect_after on size-allocate? Or connecting to map-event signal on that widget? Or spinning on gtk_events_pending() until all are done, then scroll down? " Hi Matthew G

Re: Scrolling to a GtkListBoxRow after adding it to a GtkListBox

2018-04-14 Thread Eric Cashon via gtk-app-devel-list
Hi Mike, It looks like the new rows height isn't getting added to the adjustment. If the height of the new row gets added to the upper value of the adjustment then the last row of the list box can be shown when added. This is what I came up with to test it out. Is this similar to what you ar

Scrolling to a GtkListBoxRow after adding it to a GtkListBox

2018-04-14 Thread Michael Gratton
Hey all, I assume I'm missing something obvious here, but what's the right/best way to ensure that a GtkListBoxRow child is visible (i.e. scrolled to at least the bottom of the viewport) in a scrolled GtkListBox right after adding it? I have a GtkListBox as a child of a GtkScrolledWindow, and