position dialog window relative to size (still not perfect)