]> git.lyx.org Git - features.git/commitdiff
Fix disappearing blue language underline.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 20 Jul 2018 13:23:55 +0000 (15:23 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 20 Jul 2018 13:23:55 +0000 (15:23 +0200)
Make sure that the blue language underline is not below the bottom of
the row. Otherwise, it can disappear when the next row is painted.

src/RowPainter.cpp

index a9293404788c7b04a494b39783fea5f0f659c917..16b144ebd42297c04e14d000aec1d2c914d1e4d0 100644 (file)
@@ -157,8 +157,8 @@ void RowPainter::paintForeignMark(Row::Element const & e) const
                return;
 
        int const desc = e.inset ? e.dim.descent() : 0;
-       int const y = yo_ + pi_.base.solidLineOffset()
-               + desc + pi_.base.solidLineThickness() / 2;
+       int const y = yo_ + min(3 * pi_.base.solidLineOffset() / 2 + desc,
+                               row_.descent() - 1);
        pi_.pain.line(int(x_), y, int(x_ + e.full_width()), y, Color_language,
                      Painter::line_solid, pi_.base.solidLineThickness());
 }