Recalculate the preview area when resizing the window