From 48e6184e846edd3acd55e872fc6058167969b1ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Fri, 30 May 2008 09:31:06 +0000 Subject: [PATCH] * InsetSpace.cpp: - brace/arrowfill drawing cosmetics, by Helge. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25002 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetSpace.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp index 8667fae837..86e690a777 100644 --- a/src/insets/InsetSpace.cpp +++ b/src/insets/InsetSpace.cpp @@ -239,7 +239,18 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const int const y0 = y + desc - 1; int const y1 = y - asc + oddheight - 1; int const y2 = (y0 + y1) / 2; - int const xoffset = (y0 - y1) / 2; + int xoffset = (y0 - y1) / 2; + + //Two tests for very narrow insets + if (xoffset > x1 - x0 + && (params_.kind == InsetSpaceParams::LEFTARROWFILL + || params_.kind == InsetSpaceParams::RIGHTARROWFILL)) + xoffset = x1 - x0; + if (xoffset * 6 > (x1 - x0) + && (params_.kind == InsetSpaceParams::UPBRACEFILL + || params_.kind == InsetSpaceParams::DOWNBRACEFILL)) + xoffset = (x1 - x0) / 6; + int const x2 = x0 + xoffset; int const x3 = x1 - xoffset; int const xm = (x0 + x1) / 2; -- 2.39.2