adjust the dialog layout