X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathCancel.cpp;h=098f2a8af9f6a5ac81bb9ee4d3aaf2f5b306d761;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=f4618f259c10564a5e398fb9a5add8706b3fdbc2;hpb=23832ce191e0d63088dbb6a02e9f0ebc73472004;p=lyx.git diff --git a/src/mathed/InsetMathCancel.cpp b/src/mathed/InsetMathCancel.cpp index f4618f259c..098f2a8af9 100644 --- a/src/mathed/InsetMathCancel.cpp +++ b/src/mathed/InsetMathCancel.cpp @@ -3,7 +3,7 @@ * 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. */ @@ -12,9 +12,11 @@ #include "InsetMathCancel.h" -#include "LaTeXFeatures.h" #include "MathStream.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include "frontends/Painter.h" #include @@ -35,17 +37,19 @@ Inset * InsetMathCancel::clone() const void InsetMathCancel::metrics(MetricsInfo & mi, Dimension & dim) const { + Changer dummy = mi.base.changeEnsureMath(); cell(0).metrics(mi, dim); - metricsMarkers(dim); } void InsetMathCancel::draw(PainterInfo & pi, int x, int y) const { + Changer dummy = pi.base.changeEnsureMath(); // We first draw the text and then an arrow ColorCode const origcol = pi.base.font.color(); - cell(0).draw(pi, x + 1, y); + cell(0).draw(pi, x, y); Dimension const dim = dimension(*pi.base.bv); + int const t = pi.base.solidLineThickness(); /* * y1 \ / @@ -63,15 +67,13 @@ void InsetMathCancel::draw(PainterInfo & pi, int x, int y) const int const y2 = y + dim.des; if (kind_ == cancel) - pi.pain.line(x2, y1, x1, y2, origcol); + pi.pain.line(x2, y1, x1, y2, origcol, pi.pain.line_solid, t); else if (kind_ == bcancel) - pi.pain.line(x2, y2, x1, y1, origcol); + pi.pain.line(x2, y2, x1, y1, origcol, pi.pain.line_solid, t); else if (kind_ == xcancel) { - pi.pain.line(x2, y1, x1, y2, origcol); - pi.pain.line(x2, y2, x1, y1, origcol); + pi.pain.line(x2, y1, x1, y2, origcol, pi.pain.line_solid, t); + pi.pain.line(x2, y2, x1, y1, origcol, pi.pain.line_solid, t); } - - drawMarkers(pi, x, y); }