Improve layout so buttons are always visible and dialog does not resize