]> git.lyx.org Git - features.git/commitdiff
Revert "Give a 2 pixels space for markers around math objects"
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Jun 2017 14:46:19 +0000 (16:46 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Jun 2017 14:46:19 +0000 (16:46 +0200)
This is not ready yet.

This reverts commit 5a3962958f2a2c5370b302d6dfea0967343b9a46.

src/mathed/MathRow.cpp

index b312e22e6fbb17d2ba5a88b7044e275b246ea116..783e85ab54ab2b6452adcd0bf907f45a4370e1de 100644 (file)
@@ -49,16 +49,8 @@ namespace {
 
 int markerMargin(MathRow::Element const & e)
 {
-       switch(e.marker) {
-       case InsetMath::MARKER:
-       case InsetMath::MARKER2:
-       case InsetMath::BOX_MARKER:
-               return 2;
-       case InsetMath::NO_MARKER:
-               return 0;
-       }
-       // should not happen
-       return 0;
+       return e.marker == InsetMath::MARKER
+               || e.marker == InsetMath::MARKER2;
 }
 
 
@@ -100,7 +92,7 @@ void drawMarkers(PainterInfo const & pi, MathRow::Element const & e,
        Dimension const dim = coords.getInsets().dim(e.inset);
 
        // the marker is before/after the inset. Necessary space has been reserved already.
-       int const l = x + e.before - (markerMargin(e) > 0 ? 1 : 0);
+       int const l = x + e.before - markerMargin(e);
        int const r = x + dim.width() - e.after;
 
        if (e.marker == InsetMath::BOX_MARKER) {