diff --git a/src/ChangeLog b/src/ChangeLog index 937bd0d9f6..b52baf592b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-09-19 Jean-Marc Lasgouttes + + * rowpainter.C (paintFirst): use a 'labeladdon' for TOP_* labels, + as is already done for "chapter". + 2005-09-16 Jean-Marc Lasgouttes * lyxfunc.C (dispatch): LFUN_TEXTCLASS_APPLY: actually set the diff --git a/src/rowpainter.C b/src/rowpainter.C index d59934d19e..0cbaa1b8e4 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -489,9 +489,7 @@ void RowPainter::paintFirst() } else { spacing_val = buffer.params().spacing().getValue(); } -#ifdef WITH_WARNINGS -#warning Look is this correct? -#endif + int const labeladdon = int(font_metrics::maxHeight(font) * layout->spacing.getValue() * spacing_val); int const maxdesc = int(font_metrics::maxDescent(font) * layout->spacing.getValue() * spacing_val) @@ -531,6 +529,8 @@ void RowPainter::paintFirst() else spacing_val = buffer.params().spacing().getValue(); + int const labeladdon = int(font_metrics::maxHeight(font) * layout->spacing.getValue() * spacing_val); + int maxdesc = int(font_metrics::maxDescent(font) * layout->spacing.getValue() * spacing_val + (layout->labelbottomsep * defaultRowHeight())); @@ -544,7 +544,7 @@ void RowPainter::paintFirst() x = width_ - leftMargin() - font_metrics::width(str, font); } - pain_.text(int(x), yo_ - maxdesc, str, font); + pain_.text(int(x), yo_ - maxdesc - labeladdon, str, font); } } }