rescaling layout when opening editor