Calculate popover size base on toplevel size, not screen size