1
0
mirror of https://git.lyx.org/repos/lyx.git synced 2025-01-09 18:52:46 +00:00

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
This commit is contained in:
Abdelrazak Younes 2008-01-28 21:22:29 +00:00
parent 9b0c6a43c5
commit c9273f13e8

View 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);