protected getPreferredSize(label: ILabel): Size {
// measure the label text using the font
const { width, height } = TextRenderSupport.measureText(label.text, font)
// return the measured size plus a small padding
return new Size(width + padding + padding, height + padding + padding)
}