namespace lyx {
InsetMathSize::InsetMathSize(Buffer * buf, latexkeys const * l)
- : InsetMathNest(buf, 1), key_(l), style_(Styles(convert<int>(l->extra)))
+ : InsetMathNest(buf, 1), key_(l),
+ style_(MathStyle(convert<int>(l->extra)))
{}
void InsetMathSize::metrics(MetricsInfo & mi, Dimension & dim) const
{
- StyleChanger dummy(mi.base, style_);
+ Changer dummy2 = mi.base.changeEnsureMath();
+ Changer dummy = mi.base.font.changeStyle(style_);
cell(0).metrics(mi, dim);
- metricsMarkers(dim);
}
void InsetMathSize::draw(PainterInfo & pi, int x, int y) const
{
- StyleChanger dummy(pi.base, style_);
- cell(0).draw(pi, x + 1, y);
- drawMarkers(pi, x, y);
+ Changer dummy2 = pi.base.changeEnsureMath();
+ Changer dummy = pi.base.font.changeStyle(style_);
+ cell(0).draw(pi, x, y);
}
stringstream attrs;
attrs << "displaystyle='" << (dispstyle ? "true" : "false")
<< "' scriptlevel='" << scriptlevel << "'";
- ms << MTag("mstyle", attrs.str()) << ">"
- << cell(0) << ETag("mstyle");
+ ms << MTag("mstyle", attrs.str()) << cell(0) << ETag("mstyle");
}