]> git.lyx.org Git - lyx.git/commitdiff
Fixup 7485225c: better placement of deph bar
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 19 Jan 2022 17:08:47 +0000 (18:08 +0100)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Wed, 23 Nov 2022 02:13:12 +0000 (21:13 -0500)
Fixes #12243.

(cherry picked from commit a64244b844e613aa0f739e050aa23168ff21fce9)

src/RowPainter.cpp

index cc3ea895d5fcb2ca3f932b6912622a3979e6a7cf..81769c95991aec790621b4f04046e3301ff4cc4a 100644 (file)
@@ -313,9 +313,9 @@ void RowPainter::paintDepthBar() const
        for (depth_type i = 1; i <= depth; ++i) {
                int const w = nestMargin() / 5;
                int x = int(xo_) + w * i;
-               // consider the bufferview left margin if we're drawing outermost text
+               // only consider the changebar space if we're drawing outermost text
                if (text_.isMainText())
-                       x += pi_.base.bv->leftMargin();
+                       x += pi_.base.bv->leftMargin() - changebarMargin();
 
                int const starty = yo_ - row_.ascent();
                int const h =  row_.height() - 1 - (i - next_depth - 1) * 3;