]> git.lyx.org Git - lyx.git/blobdiff - src/RowPainter.cpp
Properly fix #6369
[lyx.git] / src / RowPainter.cpp
index 4f7e667e88cad0fc02624f8fc7b2a6fa23f1fae1..4c9118d916fe37698c75778f92bca8efd68fe457 100644 (file)
@@ -83,7 +83,7 @@ RowPainter::RowPainter(PainterInfo & pi,
                dotted_line_offset_ = int(0.5 * dotted_line_thickness_) + 1;
        }
 
-       x_ = row_.x + xo_;
+       x_ = row_.left_margin + xo_;
 
        //lyxerr << "RowPainter: x: " << x_ << " xo: " << xo_ << " yo: " << yo_ << endl;
        //row_.dump();
@@ -183,7 +183,7 @@ void RowPainter::paintChars(pos_type & vpos, Font const & font)
        for (++vpos ; vpos < end ; ++vpos) {
                pos = bidi_.vis2log(vpos);
 
-               if (!font_span.inside(pos))
+               if (!font_span.contains(pos))
                        break;
 
                bool const new_spell_state =
@@ -439,6 +439,23 @@ int RowPainter::paintAppendixStart(int y)
 }
 
 
+void RowPainter::paintTooLargeMarks(bool const left, bool const right)
+{
+       if (left)
+               pi_.pain.line(int(dotted_line_thickness_), yo_ - row_.ascent(),
+                                         int(dotted_line_thickness_), yo_ + row_.descent(),
+                                         Color_scroll,
+                                         Painter::line_onoffdash, dotted_line_thickness_);
+       if (right) {
+               int const wwidth = pi_.base.bv->workWidth() - int(dotted_line_thickness_);
+               pi_.pain.line(wwidth, yo_ - row_.ascent(),
+                                         wwidth, yo_ + row_.descent(),
+                                         Color_scroll,
+                                         Painter::line_onoffdash, dotted_line_thickness_);
+       }
+}
+
+
 void RowPainter::paintFirst()
 {
        BufferParams const & bparams = pi_.base.bv->buffer().params();
@@ -736,13 +753,13 @@ void RowPainter::paintText()
                }
 
                // Use font span to speed things up, see above
-               if (!font_span.inside(pos)) {
+               if (!font_span.contains(pos)) {
                        font_span = par_.fontSpan(pos);
                        font = text_metrics_.displayFont(pit_, pos);
 
                        // split font span if inline completion is inside
                        if (inlineCompletionVPos != -1
-                           && font_span.inside(inlineCompletionPos.pos()))
+                           && font_span.contains(inlineCompletionPos.pos()))
                                font_span.last = inlineCompletionPos.pos();
                }