Added support for dynamic button widths