[LyX/master] Fixup ad954a32: make space insets easier to see.

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Sep 9 09:02:37 UTC 2020


commit bf25e8568db22625feb3affbf3e31df804dae916
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed Sep 9 11:07:48 2020 +0200

    Fixup ad954a32: make space insets easier to see.
    
    The previous code left one extra pixel on each side of the visible space, and
    spaces became too small to be readable.
---
 src/insets/InsetSpace.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/insets/InsetSpace.cpp b/src/insets/InsetSpace.cpp
index 5a4f468..7656a14 100644
--- a/src/insets/InsetSpace.cpp
+++ b/src/insets/InsetSpace.cpp
@@ -390,18 +390,18 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const
 	int const h = theFontMetrics(pi.base.font).xHeight();
 	int xp[4], yp[4];
 
-	xp[0] = x + 1;
+	xp[0] = x;
 	yp[0] = y - max(h / 4, 1);
 	if (params_.kind == InsetSpaceParams::NORMAL ||
 	    params_.kind == InsetSpaceParams::PROTECTED ||
 	    params_.kind == InsetSpaceParams::VISIBLE) {
-		xp[1] = x + 1;     yp[1] = y;
-		xp[2] = x + w - 2; yp[2] = y;
+		xp[1] = x;         yp[1] = y;
+		xp[2] = x + w - 1; yp[2] = y;
 	} else {
-		xp[1] = x + 1;     yp[1] = y + max(h / 4, 1);
-		xp[2] = x + w - 2; yp[2] = y + max(h / 4, 1);
+		xp[1] = x;         yp[1] = y + max(h / 4, 1);
+		xp[2] = x + w - 1; yp[2] = y + max(h / 4, 1);
 	}
-	xp[3] = x + w - 2;
+	xp[3] = x + w - 1;
 	yp[3] = y - max(h / 4, 1);
 
 	Color col = Color_special;


More information about the lyx-cvs mailing list