The box is automatically generated to be the same size as the image on the button.
If it looks bigger than the image, that does not matter. You cannot click on the transparent part of the image. You can put two buttons closer to each other with the transparent part of "boxes" overlapping if you want to.