]> git.lyx.org Git - features.git/commitdiff
Fix drawing of empty boxes
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 12 Jan 2017 11:15:17 +0000 (12:15 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 12 Jan 2017 11:15:17 +0000 (12:15 +0100)
They were actually bigger than their metrics.

src/mathed/MathRow.cpp

index cfb41642d476d6506cb30f797fa4d7cf6403c8e1..9465b326908b85555ab38cd8876a136267c281a8 100644 (file)
@@ -289,7 +289,7 @@ void MathRow::draw(PainterInfo & pi, int x, int const y) const
                        // 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(),
-                                                 d.width(), d.height(), e.color);
+                                                 d.width() - 1, d.height() - 1, e.color);
                        x += d.wid + e.before + e.after;
                        break;
                }