Fixed end scroll on size change

This commit is contained in:
Jesse van den Kieboom 2006-03-31 20:30:12 +00:00
parent 422fa448e6
commit 6c987facb9
1 changed files with 9 additions and 1 deletions

View File

@ -227,7 +227,15 @@ on_gm_text_scroller_text_view_size_allocate(GtkWidget *widget,
GtkAllocation *allocation, GmTextScroller *scroller) {
if (gm_text_scroller_is_end_scrolled_margin(scroller,
abs(allocation->height - scroller->priv->allocation.height))) {
gm_text_scroller_scroll_end(scroller);
if (scroller->priv->idle_handler == 0) {
gm_text_scroller_scroll_end(scroller);
// Ensure the end scroll for large texts
scroller->priv->idle_handler = g_idle_add((GSourceFunc)
gm_text_scroller_scroll_end_idle, scroller);
}
} else {
GM_DEBUG("Size allocate");
}
scroller->priv->allocation = *allocation;