Fixed end scroll on size change
This commit is contained in:
parent
422fa448e6
commit
6c987facb9
|
@ -227,7 +227,15 @@ on_gm_text_scroller_text_view_size_allocate(GtkWidget *widget,
|
||||||
GtkAllocation *allocation, GmTextScroller *scroller) {
|
GtkAllocation *allocation, GmTextScroller *scroller) {
|
||||||
if (gm_text_scroller_is_end_scrolled_margin(scroller,
|
if (gm_text_scroller_is_end_scrolled_margin(scroller,
|
||||||
abs(allocation->height - scroller->priv->allocation.height))) {
|
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;
|
scroller->priv->allocation = *allocation;
|
||||||
|
|
Reference in New Issue