}
-void RenderButton::metrics(MetricsInfo &, Dimension & dim) const
+bool RenderButton::metrics(MetricsInfo &, Dimension & dim) const
{
LyXFont font(LyXFont::ALL_SANE);
font.decSize();
fm.rectText(text_, dim.wid, dim.asc, dim.des);
dim.wid += 4;
+ if (dim_ == dim)
+ return false;
+ dim_ = dim;
+ return true;
}
font.decSize();
if (editable_) {
- pi.pain.buttonText(x + 2, y, text_, font);
+ pi.pain.buttonText(x + 2, y, text_, font, renderState());
} else {
pi.pain.rectText(x + 2, y, text_, font,
LColor::commandbg, LColor::commandframe);