Refactor the code to reuse the same function for determining the size needed by an embedded control in the toolbar, including its label.