mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
a bit nice underlines
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@657 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7670f99a23
commit
36e819ef14
@ -1,5 +1,7 @@
|
||||
2000-04-14 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* 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 <larsbj@lyx.org>
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user