mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 07:23:46 +01:00
refresh horizontal position in page_set
After page_set cb_view_hadjustment_changed must be called so that when zoom-center is enabled, the page is recentered. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
7f42ccbdad
commit
7cdd1e7719
@ -333,9 +333,6 @@ sc_goto(girara_session_t* session, girara_argument_t* argument, girara_event_t*
|
||||
page_set(zathura, zathura_document_get_number_of_pages(zathura->document) - 1);
|
||||
}
|
||||
|
||||
/* adjust horizontal position */
|
||||
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
cb_view_hadjustment_changed(hadjustment, zathura);
|
||||
zathura_jumplist_add(zathura);
|
||||
|
||||
return false;
|
||||
@ -472,10 +469,6 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
|
||||
|
||||
page_set(zathura, new_page);
|
||||
|
||||
/* adjust horizontal position */
|
||||
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
cb_view_hadjustment_changed(hadjustment, zathura);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1031,6 +1031,9 @@ page_set(zathura_t* zathura, unsigned int page_id)
|
||||
zathura_adjustment_set_value(view_hadjustment, offset.x);
|
||||
zathura_adjustment_set_value(view_vadjustment, offset.y);
|
||||
|
||||
/* refresh horizontal adjustment, to honor zoom-center */
|
||||
cb_view_hadjustment_changed(view_hadjustment, zathura);
|
||||
|
||||
statusbar_page_number_update(zathura);
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user