commit 596c9065e6feb8cfaadf79abd8cc73233d9442f1
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Jan 13 10:17:05 2017 +0100

    BOX tweak
---
 src/mathed/MathRow.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mathed/MathRow.cpp b/src/mathed/MathRow.cpp
index 9465b32..7eb5eb6 100644
--- a/src/mathed/MathRow.cpp
+++ b/src/mathed/MathRow.cpp
@@ -175,7 +175,8 @@ void MathRow::metrics(MetricsInfo & mi, Dimension & dim) 
const
                        break;
                case BOX:
                        d = theFontMetrics(mi.base.font).dimension('I');
-                       d.wid += e.before + e.after;
+                       // allow for one pixel in front of the box.
+                       d.wid += e.before + e.after + 1;
                        break;
                }
 
@@ -288,7 +289,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, y - d.ascent(),
+                               pi.pain.rectangle(x + e.before + 1, y - 
d.ascent(),
                                                  d.width() - 1, d.height() - 
1, e.color);
                        x += d.wid + e.before + e.after;
                        break;

Reply via email to