]> git.lyx.org Git - features.git/commitdiff
Place the depth bar correctly in screen mode
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Sep 2018 14:45:48 +0000 (16:45 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Sep 2018 14:45:48 +0000 (16:45 +0200)
In full screen mode, it is possible to restrict the text width. In
this case, the paint bar should not be painted outside of this
restricted area.

Fixes bug #11286.

src/RowPainter.cpp

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