Apply zoom limits to the zoom gesture

This commit is contained in:
Liao Junxuan 2023-11-20 21:23:16 +08:00 committed by Sebastian Ramacher
parent 5244b07d6a
commit 1419beccd0

View File

@ -829,7 +829,8 @@ cb_gesture_zoom_scale_changed(GtkGestureZoom* UNUSED(self), gdouble scale, void*
}
const double next_zoom = zathura->gesture.initial_zoom * scale;
zathura_document_set_zoom(zathura->document, next_zoom);
const double corrected_zoom = zathura_correct_zoom_value(zathura->ui.session, next_zoom);
zathura_document_set_zoom(zathura->document, corrected_zoom);
render_all(zathura);
refresh_view(zathura);
}