Layout main window when min/max is set