]> git.lyx.org Git - features.git/commitdiff
Adjustment to the end box drawing at the end of a proof layout environment (Theorem...
authorAbdelrazak Younes <younes@lyx.org>
Mon, 28 Jan 2008 21:22:29 +0000 (21:22 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 28 Jan 2008 21:22:29 +0000 (21:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22702 a592a061-630c-0410-9148-cb99ea01b6c8

src/rowpainter.cpp

index dc0ed5f1cccb42fda054d70086308b5bffc25f25..78c17a8adba635c085af309388bb56f85ab9e374 100644 (file)
@@ -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);