[LyX/master] Fix depth bar optics

Jean-Marc Lasgouttes lasgouttes at lyx.org
Fri Jun 14 14:28:09 UTC 2024


commit 92aeaf5d73923af03b6ab0e1711b157375d4c8e4
Author: Daniel Ramoeller <d.lyx at web.de>
Date:   Thu Aug 13 16:36:15 2020 +0200

    Fix depth bar optics
---
 src/RowPainter.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index 19d83c13a3..e84343a7aa 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -352,12 +352,12 @@ void RowPainter::paintDepthBar() const
 		int const starty = yo_ - row_.ascent();
 		int const h =  row_.height() - 1 - (i - next_depth - 1) * 3;
 
-		pi_.pain.line(x, starty, x, starty + h, Color_depthbar);
+		pi_.pain.line(x, starty + (i > prev_depth ? 1 : 0), x, starty + h, Color_depthbar);
 
 		if (i > prev_depth)
 			pi_.pain.fillRectangle(x, starty, w, 2, Color_depthbar);
 		if (i > next_depth)
-			pi_.pain.fillRectangle(x, starty + h, w, 2, Color_depthbar);
+			pi_.pain.fillRectangle(x, starty + h - 1, w, 2, Color_depthbar);
 	}
 }
 


More information about the lyx-cvs mailing list