Depthbar optics

Daniel xracoonx at gmx.de
Thu Aug 13 14:22:42 UTC 2020


The depth bar looks a bit out of shape (both in stable and master). The 
attached patch fixes this. See the attached screen captures - the 
"before" is taken in stable and the after in master that is the only 
reason why the length differs.
-- 
Daniel
-------------- next part --------------
From b6d846547d9bd97f3b287e522c57d5ad593a4a7e Mon Sep 17 00:00:00 2001
From: Daniel Ramoeller <d.lyx at web.de>
Date: Thu, 13 Aug 2020 16:04:06 +0200
Subject: [PATCH] Fix depth bar optics

---
 src/RowPainter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index 6e4cf31ac1..45b293dabd 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -344,7 +344,7 @@ 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 + (i > next_depth ? 1 : 0), Color_depthbar);
 
 		if (i > prev_depth)
 			pi_.pain.fillRectangle(x, starty, w, 2, Color_depthbar);
-- 
2.24.3 (Apple Git-128)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: depthbar_after.png
Type: image/png
Size: 4402 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200813/805a0782/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: depthbar_before.png
Type: image/png
Size: 4321 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200813/805a0782/attachment-0001.png>


More information about the lyx-devel mailing list