Made layout recalculate on resize.