mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 13:35:59 +01:00
Honor the current zoom level.
Otherwise jump positions are off after changing the zoom level.
This commit is contained in:
parent
af04432892
commit
e79a48452f
2 changed files with 7 additions and 5 deletions
|
@ -637,13 +637,15 @@ sc_jumplist(girara_session_t* session, girara_argument_t* argument, girara_event
|
|||
break;
|
||||
}
|
||||
|
||||
if (jump != NULL) {
|
||||
page_set(zathura, jump->page);
|
||||
position_set_delayed(zathura, jump->x, jump->y);
|
||||
const double s = zathura_document_get_scale(zathura->document);
|
||||
position_set_delayed(zathura, jump->x * s, jump->y * s);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
sc_search(girara_session_t* session, girara_argument_t* argument,
|
||||
girara_event_t* UNUSED(event), unsigned int UNUSED(t))
|
||||
|
|
|
@ -1130,7 +1130,7 @@ zathura_jumplist_save(zathura_t* zathura) {
|
|||
GtkAdjustment* view_hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
|
||||
|
||||
cur->page = pagenum;
|
||||
cur->x = gtk_adjustment_get_value(view_hadjustment);
|
||||
cur->y = gtk_adjustment_get_value(view_vadjustment);
|
||||
cur->x = gtk_adjustment_get_value(view_hadjustment) / zathura_document_get_scale(zathura->document);
|
||||
cur->y = gtk_adjustment_get_value(view_vadjustment) / zathura_document_get_scale(zathura->document);;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue