diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index f92e55bcc2..7f96ebc5cd 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -649,7 +649,6 @@ void RowPainter::paintLast() pi_.pain.line(int(x_) + 1 - length, yo_ + 2, int(x_) + 1, yo_ + 2, col, Painter::line_solid, Painter::line_thick); } - } // draw an endlabel @@ -681,9 +680,8 @@ void RowPainter::paintLast() FontInfo const font = labelFont(); FontMetrics const & fm = theFontMetrics(font); docstring const & str = par_.layout().endlabelstring(); - double const x = is_rtl ? - x_ - fm.width(str) - : - text_metrics_.rightMargin(pm_) - row_.width(); + double const x = is_rtl ? + text_metrics_.width() - row_.width() - fm.width(str) : x_; pi_.pain.text(int(x), yo_, str, font); break; }