More accurate dialog size calculations