* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author Uwe Stöhr
+ * \author Uwe Stöhr
*
* Full author contact details are available in file CREDITS.
*/
#include "InsetMathCancelto.h"
-#include "Cursor.h"
-#include "LaTeXFeatures.h"
#include "MathData.h"
#include "MathStream.h"
+#include "Cursor.h"
+#include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
+
#include "frontends/Painter.h"
#include <ostream>
void InsetMathCancelto::metrics(MetricsInfo & mi, Dimension & dim) const
{
+ Changer dummy = mi.base.changeEnsureMath();
InsetMathNest::metrics(mi);
Dimension const & dim0 = cell(0).dimension(*mi.base.bv);
Dimension const & dim1 = cell(1).dimension(*mi.base.bv);
dim.asc = max(dim0.ascent() + 2, dim0.ascent() + dim1.ascent()) + 2 + 8;
dim.des = max(dim0.descent() - 2, dim1.descent()) + 2;
dim.wid = dim0.width() + dim1.width() + 10;
- metricsMarkers(dim);
+ metricsMarkers(mi, dim);
}
void InsetMathCancelto::draw(PainterInfo & pi, int x, int y) const
{
+ Changer dummy = pi.base.changeEnsureMath();
ColorCode const origcol = pi.base.font.color();
// We first draw the text and then an arrow