Calculate end gap after an 'Above' layout correctly