Adjust the layout of the main UI