Fit frame to viewer when resizing