Skip to content

Commit

Permalink
fixed trackpad too fast issue (zoom in/out)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Jan 22, 2023
1 parent dd52f1f commit b6b3b20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cpp/re/edit/Panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}

Expand Down

0 comments on commit b6b3b20

Please sign in to comment.