Set the icon height when measuring.

If we set the icon height during layout, then the button's size may
already be too small.