+void FocusLabel::fitString(const std::string &str)
+{
+ const Font *ft = style()->labelFont();
+ fitSize(ft->measureString(str), ft->height());
+}
+
+void FocusLabel::fitSize(int w, int h)
+{
+ unsigned int sidemargin = style()->bevelWidth() * 2;
+ resize(w + sidemargin * 2, h);
+}