Depthbar optics
Daniel
xracoonx at gmx.de
Thu Aug 13 14:40:51 UTC 2020
On 2020-08-13 16:22, Daniel wrote:
> 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.
I just noticed another paining issue: in certain circumstances the
delimiter gets cut off slightly when re-painting the line. The attached
patch which is alternative to the previous one I sent avoids this. See
attached screen captures (again 2.3 and 2.4 captures because compiling
takes such a long time for me currently).
--
Daniel
-------------- next part --------------
From dc1d70e9bd5aa9abc169c7195b18d1a5f8da6d8b Mon Sep 17 00:00:00 2001
From: Daniel Ramoeller <d.lyx at web.de>
Date: Thu, 13 Aug 2020 16:36:15 +0200
Subject: [PATCH] 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 6e4cf31ac1..955c7bb274 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -344,12 +344,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);
}
}
--
2.24.3 (Apple Git-128)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: depthbarcut_after.png
Type: image/png
Size: 12592 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200813/ffa45455/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: depthbarcut_before.png
Type: image/png
Size: 13131 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200813/ffa45455/attachment-0003.png>
More information about the lyx-devel
mailing list