pre-calculate inner_rect dimensions for layout