Correct padding when resizing window.