update midlayout