Improve button text layout

Improve the measuring and layout of button texts by not applying padding twice and using the full available height for button texts in the case where we have to reduce the width.