Recenter dialog on window resize.