Fix zoom speed dependence on buffer/image width

This commit is contained in:
Ronan Dalton 2021-07-01 00:12:16 +12:00 committed by Harry Jeffery
parent 22cd0b3813
commit eccd3cf912

View file

@ -160,7 +160,7 @@ void imv_viewport_zoom(struct imv_viewport *view, const struct imv_image *image,
const int wc_x = view->buffer.width/2;
const int wc_y = view->buffer.height/2;
const double scale_factor = exp(0.04 * view->buffer.width * amount / image_width);
const double scale_factor = pow(1.04, amount);
view->scale *= scale_factor;
const double min_scale = 0.1;