X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathCancelto.cpp;h=cf6b006d446485b739a9f1179e3f01604bbe05db;hb=28be7d552f62cc02fa86d7f79201d089bfb2d7b5;hp=283a97157d7d9c66033523fae6778d8032d7e026;hpb=eadc55b8b38a489202e2e168521578dae119fd59;p=lyx.git diff --git a/src/mathed/InsetMathCancelto.cpp b/src/mathed/InsetMathCancelto.cpp index 283a97157d..cf6b006d44 100644 --- a/src/mathed/InsetMathCancelto.cpp +++ b/src/mathed/InsetMathCancelto.cpp @@ -42,13 +42,12 @@ Inset * InsetMathCancelto::clone() const void InsetMathCancelto::metrics(MetricsInfo & mi, Dimension & dim) const { Changer dummy = mi.base.changeEnsureMath(); - InsetMathNest::metrics(mi); + cellsMetrics(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(mi, dim); } @@ -59,11 +58,11 @@ void InsetMathCancelto::draw(PainterInfo & pi, int x, int y) const // We first draw the text and then an arrow Dimension const & dim0 = cell(0).dimension(*pi.base.bv); - cell(0).draw(pi, x + 1, y); - cell(1).draw(pi, x + dim0.wid + 2 + 8, y - dim0.asc - 8); - + cell(0).draw(pi, x, y); + cell(1).draw(pi, x + dim0.wid + 1 + 8, y - dim0.asc - 8); + //Dimension const dim = dimension(*pi.base.bv); - + // y3____ ___ // /| // y2_ / | @@ -86,8 +85,6 @@ void InsetMathCancelto::draw(PainterInfo & pi, int x, int y) const // the arrow bars pi.pain.line(x3, y3, x2 + 2, y3, origcol); pi.pain.line(x3, y3, x3 - 2, y2 - 2, origcol); - - drawMarkers(pi, x, y); }