From: Lars Gullik Bjønnes Date: Fri, 14 Apr 2000 18:29:25 +0000 (+0000) Subject: a bit nice underlines X-Git-Tag: 1.6.10~22298 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=36e819ef14243c9121b0d88526c37ad83c6bca1f;p=features.git a bit nice underlines git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@657 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index 828cf7115e..49851cc600 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2000-04-14 Lars Gullik Bjønnes + * src/Painter.C (underline): draw a slimer underline in most cases. + * src/lyx_main.C (error_handler): use extern "C" 2000-04-12 Lars Gullik Bjønnes diff --git a/src/Painter.C b/src/Painter.C index fa8db6ea0c..8d44c84fb2 100644 --- a/src/Painter.C +++ b/src/Painter.C @@ -324,8 +324,12 @@ void Painter::underline(LyXFont const & f, int x, int y, int width) // What about underbars? if (f.underbar() == LyXFont::ON && f.latex() != LyXFont::ON) { int below = max(lyxfont::maxDescent(f) / 2, 2); - int height = max((lyxfont::maxDescent(f) / 4) - 1, 0); - fillRectangle(x, y + below, width, below + height, f.color()); + int height = max((lyxfont::maxDescent(f) / 4) - 1, 1); + if (height < 2) + line(x, y + below, x + width, y + below, f.color()); + else + fillRectangle(x, y + below, width, below + height, + f.color()); } }