Calculate heights dynamically.

This survives an orientation change.