From c9273f13e8d129eeedbf04d517c8f05a06f0cc0a Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 28 Jan 2008 21:22:29 +0000 Subject: [PATCH] Adjustment to the end box drawing at the end of a proof layout environment (Theorem AMS). Ideas taken from Richard and JMarc. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22702 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/rowpainter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index dc0ed5f1cc..78c17a8adb 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -610,10 +610,12 @@ void RowPainter::paintLast() FontMetrics const & fm = theFontMetrics(font); int const size = int(0.75 * fm.maxAscent()); int const y = yo_ - size; - int x = is_rtl ? nestMargin() + changebarMargin() : width_ - size; + int x = is_rtl ? nestMargin() + changebarMargin() : width_ + - text_metrics_.rightMargin(pm_) - size - Inset::TEXT_TO_INSET_OFFSET; - if (width_ - int(row_.width()) <= size) - x += (size - width_ + row_.width() + 1) * (is_rtl ? -1 : 1); + int const rem = width_ - row_.width() - size; + if (rem <= 0) + x += rem * (is_rtl ? 1 : -1); if (endlabel == END_LABEL_BOX) pi_.pain.rectangle(x, y, size, size, Color_eolmarker); -- 2.39.5