Stole code from @asb to calculate screen settings for whiptail