Open dialogs with a size relative to parent window and center to it

issue3490
review1501002