diff --git a/src/cpp/re/edit/Panel.cpp b/src/cpp/re/edit/Panel.cpp index 3ac02bd..0fb5a4d 100644 --- a/src/cpp/re/edit/Panel.cpp +++ b/src/cpp/re/edit/Panel.cpp @@ -417,7 +417,10 @@ void Panel::handleCanvasInputs(AppContext &iCtx, ReGui::Canvas &iCanvas) { auto mouseVerticalWheel = ImGui::GetIO().MouseWheel; if(mouseVerticalWheel != 0) - iCanvas.zoomBy(mouseVerticalWheel > 0 ? 0.9f : 1.1f, iCanvas.getCanvasMousePos()); + { + auto zoom = 1.0f - mouseVerticalWheel * 0.05f; + iCanvas.zoomBy(zoom, iCanvas.getCanvasMousePos()); + } } }