extract dialog resizing into abstract class