Fix margins to work correctly with editor scaling.