Idea: Smooth zoom with mouse (ex: CTRL-MMB drag)

It’s often desirable to zoom in just the right amount – smooth zoom with mouse drag satisfies this. I believe some people use touchpads for it, but I believe the mouse is suitable for this. CTRL-MMB seems a good candidate, as this is shared with other software (or at least Blender). Some other threads exist on the topic of mouse-wheel zoom, but I felt the option for offering a smooth zoom feature could use its own topic, being slightly different from the incremental zoom of the mouse-wheel.

Thank you. :slight_smile:

just a heads up:

  • this is mostly a support forum (if Dev’s post they usually answer stuff that us mere mortals don’t know :wink:
  • wishes for features need to be posted on the bugtracker with ‘wishlist’ as tag
  • pure wishes, without support by a Dev or patch-ready to go into KiCAD code will become pipe dreams as the Dev team for KiCAD is very small
    Sorry & good luck.

(in case you want to post there, search for 15 minutes if no one else already posted a similar wish and if so, get registered and vote on that wish at top left with “this bug affects me too”)

The mouse-wheel is already rate-smart, ie if you move it slowly, you get finer zoom steps.
Quite clever, and makes KiCad’s zoom one of the smarter ones I’ve seen.

Are those finer steps, still too coarse for you ?
If not, if may be easier to re-scale that rate-smarts a little, than to create a completely new Zoom ?

Truly Smooth Zoom is going to need a certain fast redraw speed to work, which may be difficult meeting on complex PCB designs.
Is the average PC KiCad is used on, fast enough for this yet ?

Hi @Jaggz_H, I really liked that idea. I’m a trackball user. The one I use right now doesn’t have a mouse wheel so I use its emulation feature. Its similar to what happens in touchpads. Zooming is really annoying and I get really tense when doing it :slight_smile:

I thought this idea should be great with a trackball. So I went ahead and implemented it. Code is at my github branch.

At the moment it works similar to scroll with a mouse wheel. Clicking on screen with middle click while Ctrl is pressed jumps cursor to the center, and you zoom in/out by moving cursor up/down while middle click is still pressed.

I found this behavior somewhat uncomfortable, so I’m thinking about a version that is integrated with middle click dragging of the screen.

I’ve implemented the other version that I mentioned. It’s in another branch. Here is a video of it in action:

This one is integrated in to the screen dragging (panning). When moving the screen with the middle click, if you press the the Ctrl, it will zoom in/out instead panning. When you let go off the Ctrl, you will continue to pan.

By the way @PCB_Wiz I haven’t noticed any performance impact. I have a i7 4700k CPU running with Intel Integrated Graphics.

1 Like