]> git.lyx.org Git - lyx.git/commitdiff
Revert "BOX tweak"
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 17 Jan 2017 15:31:34 +0000 (16:31 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 17 Jan 2017 15:31:34 +0000 (16:31 +0100)
This reverts commit 596c9065e6feb8cfaadf79abd8cc73233d9442f1.

src/mathed/MathRow.cpp

index 7eb5eb6d2aae1edc86e2472fdfd7919423a0dae8..9465b326908b85555ab38cd8876a136267c281a8 100644 (file)
@@ -175,8 +175,7 @@ void MathRow::metrics(MetricsInfo & mi, Dimension & dim) const
                        break;
                case BOX:
                        d = theFontMetrics(mi.base.font).dimension('I');
-                       // allow for one pixel in front of the box.
-                       d.wid += e.before + e.after + 1;
+                       d.wid += e.before + e.after;
                        break;
                }
 
@@ -289,7 +288,7 @@ void MathRow::draw(PainterInfo & pi, int x, int const y) const
                        Dimension const d = theFontMetrics(pi.base.font).dimension('I');
                        // the box is not visible in non-editable context (except for grey macro boxes).
                        if (e.color != Color_none)
-                               pi.pain.rectangle(x + e.before + 1, y - d.ascent(),
+                               pi.pain.rectangle(x + e.before, y - d.ascent(),
                                                  d.width() - 1, d.height() - 1, e.color);
                        x += d.wid + e.before + e.after;
                        break;