From: Jean-Marc Lasgouttes Date: Tue, 17 Jan 2017 15:31:34 +0000 (+0100) Subject: Revert "BOX tweak" X-Git-Tag: 2.3.0alpha1~458 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5982d2abd7a05bd5690f8885cd56921a4945ade3;p=features.git Revert "BOX tweak" This reverts commit 596c9065e6feb8cfaadf79abd8cc73233d9442f1. --- diff --git a/src/mathed/MathRow.cpp b/src/mathed/MathRow.cpp index 7eb5eb6d2a..9465b32690 100644 --- a/src/mathed/MathRow.cpp +++ b/src/mathed/MathRow.cpp @@ -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;