mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 13:56:00 +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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
page_set(zathura, jump->page);
|
if (jump != NULL) {
|
||||||
position_set_delayed(zathura, jump->x, jump->y);
|
page_set(zathura, jump->page);
|
||||||
|
const double s = zathura_document_get_scale(zathura->document);
|
||||||
|
position_set_delayed(zathura, jump->x * s, jump->y * s);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
sc_search(girara_session_t* session, girara_argument_t* argument,
|
sc_search(girara_session_t* session, girara_argument_t* argument,
|
||||||
girara_event_t* UNUSED(event), unsigned int UNUSED(t))
|
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));
|
GtkAdjustment* view_hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
|
||||||
|
|
||||||
cur->page = pagenum;
|
cur->page = pagenum;
|
||||||
cur->x = gtk_adjustment_get_value(view_hadjustment);
|
cur->x = gtk_adjustment_get_value(view_hadjustment) / zathura_document_get_scale(zathura->document);
|
||||||
cur->y = gtk_adjustment_get_value(view_vadjustment);
|
cur->y = gtk_adjustment_get_value(view_vadjustment) / zathura_document_get_scale(zathura->document);;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue