Skip to content

#5145 - Enhance 'Zoom to Fit' w user settable margins and add 'Zoom to Items'

The margin used in 'Zoom to Fit' is hardcoded at 10%. This code adds GUI control of the margin for Pcbnew and Eeschema.

In Eeschema, 'Zoom to Fit' uses a bbox of the page border and adds the hardcoded margin of 10% to it. This results in a very wide view. This code adds a 'Zoom to Items' to Eeschema (with a GUI to set the margin) that uses a bbox of all items except the page border. The default hotkey assigned to this is CTRL-Home to work consistently with the already assigned hotkey of 'Home' for 'Zoom to Fit'.

Fixes issue: #5145 (closed)

Edited by Peter Montgomery

Merge request reports