#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
-using lyx::docstring;
+
+namespace lyx {
using std::string;
using std::auto_ptr;
}
-void RenderButton::metrics(MetricsInfo &, Dimension & dim) const
+bool RenderButton::metrics(MetricsInfo &, Dimension & dim) const
{
LyXFont font(LyXFont::ALL_SANE);
font.decSize();
- lyx::frontend::FontMetrics const & fm =
+ frontend::FontMetrics const & fm =
theFontMetrics(font);
if (editable_)
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);
}
}
+
+
+} // namespace lyx