mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +00:00
InsetPhantom.cpp: metrics fix for the horizontal arrow
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28308 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
10d742cfe3
commit
6e506647ab
@ -155,6 +155,9 @@ void InsetPhantom::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
// draw the text
|
||||
InsetText::draw(pi, x, y);
|
||||
|
||||
// draw the inset marker
|
||||
drawMarkers(pi, x, y);
|
||||
|
||||
// draw the arrow(s)
|
||||
static int const arrow_size = 4;
|
||||
@ -208,9 +211,10 @@ void InsetPhantom::draw(PainterInfo & pi, int x, int y) const
|
||||
// | | | |
|
||||
// x1 x2 x3 x4
|
||||
|
||||
x = x + TEXT_TO_INSET_OFFSET;
|
||||
int const x1 = x;
|
||||
int const x2 = x + arrow_size;
|
||||
int const x4 = x + dim.wid;
|
||||
int const x4 = x + dim.wid - 2 * TEXT_TO_INSET_OFFSET;
|
||||
int const x3 = x4 - arrow_size;
|
||||
|
||||
int const y2 = y + (dim.des - dim.asc) / 2;
|
||||
@ -228,8 +232,6 @@ void InsetPhantom::draw(PainterInfo & pi, int x, int y) const
|
||||
// joining line
|
||||
pi.pain.line(x1, y2, x4, y2, Color_added_space);
|
||||
}
|
||||
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user