fix centering of LABEL_CENTERED_TOP_ENVIRONMENT

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10642 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2005-12-02 13:20:26 +00:00
parent 6a36d26356
commit 6f8059d09f
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-12-01 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* rowpainter.C (paintFirst): fix centering of
LABEL_CENTERED_TOP_ENVIRONMENT.
2005-11-30 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView.C (mouseSetCursor): new method. Calls

View File

@ -537,8 +537,9 @@ void RowPainter::paintFirst()
double x = x_;
if (layout->labeltype == LABEL_CENTERED_TOP_ENVIRONMENT) {
x = ((is_rtl ? leftMargin() : x_)
+ width_ - text_.rightMargin(par_)) / 2;
if (is_rtl)
x = leftMargin();
x += (width_ - text_.rightMargin(par_) - leftMargin()) / 2;
x -= font_metrics::width(str, font) / 2;
} else if (is_rtl) {
x = width_ - leftMargin() -