mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-02-27 21:44:40 +01:00
Merge branch 'zoom-fix' into 'develop'
fix smooth zooming calculations See merge request pwmt/zathura!23
This commit is contained in:
commit
fdbac740ce
1 changed files with 2 additions and 2 deletions
|
@ -1395,8 +1395,8 @@ sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t*
|
||||||
}
|
}
|
||||||
} else if (argument->n == ZOOM_SMOOTH) {
|
} else if (argument->n == ZOOM_SMOOTH) {
|
||||||
const double dy = (event != NULL) ? event->y : 1.0;
|
const double dy = (event != NULL) ? event->y : 1.0;
|
||||||
girara_debug("Increasing zoom by %0.2f.", zoom_step * dy - 1.0);
|
girara_debug("Increasing zoom by %0.2f.", pow(zoom_step, -dy) - 1.0);
|
||||||
zathura_document_set_zoom(zathura->document, old_zoom + zoom_step * dy);
|
zathura_document_set_zoom(zathura->document, old_zoom * pow(zoom_step, -dy));
|
||||||
} else {
|
} else {
|
||||||
girara_debug("Setting zoom to 1.");
|
girara_debug("Setting zoom to 1.");
|
||||||
zathura_document_set_zoom(zathura->document, 1.0);
|
zathura_document_set_zoom(zathura->document, 1.0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue