mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 13:26:00 +01:00
parent
b5bf7ef835
commit
9e643d4224
1 changed files with 4 additions and 7 deletions
11
shortcuts.c
11
shortcuts.c
|
@ -802,8 +802,6 @@ sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument),
|
|||
gtk_widget_show(treeview);
|
||||
}
|
||||
|
||||
GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
static double vvalue = 0;
|
||||
static double hvalue = 0;
|
||||
|
||||
|
@ -813,13 +811,12 @@ sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument),
|
|||
girara_mode_set(zathura->ui.session, zathura->modes.normal);
|
||||
|
||||
/* reset adjustment */
|
||||
gtk_adjustment_set_value(vadjustment, vvalue);
|
||||
gtk_adjustment_set_value(hadjustment, hvalue);
|
||||
|
||||
gtk_scrolled_window_set_vadjustment(GTK_SCROLLED_WINDOW(session->gtk.view), vadjustment);
|
||||
gtk_scrolled_window_set_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view), hadjustment);
|
||||
position_set_delayed(zathura, hvalue, vvalue);
|
||||
} else {
|
||||
/* save adjustment */
|
||||
GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
|
||||
|
||||
vvalue = gtk_adjustment_get_value(vadjustment);
|
||||
hvalue = gtk_adjustment_get_value(hadjustment);
|
||||
|
||||
|
|
Loading…
Reference in a new issue