From: Angus Leeming Date: Tue, 23 Jul 2002 09:23:11 +0000 (+0000) Subject: Aesthetic improvement of equation positioning when previewing in display mode. X-Git-Tag: 1.6.10~18773 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b3fa703ea7260740885f1930327fc3f7978f79e1;p=features.git Aesthetic improvement of equation positioning when previewing in display mode. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4758 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 3561ef3dc4..3da70dd673 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2002-07-23 Angus Leeming + + * formula.C (descent): add an arbitrary 12 pixels to the descent when + previewing a display mode equation, analogous to André's code elsewhere. + 2002-07-22 Jean-Marc Lasgouttes * math_support.C (mathed_draw_deco): fix rounding bug for rotated diff --git a/src/mathed/formula.C b/src/mathed/formula.C index cb48996910..d2c32a2e49 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -448,8 +448,11 @@ int InsetFormula::ascent(BufferView *, LyXFont const &) const int InsetFormula::descent(BufferView *, LyXFont const &) const { - return preview_->usePreview() ? - preview_->pimage_->descent() : 1 + par_->descent(); + if (!preview_->usePreview()) + return 1 + par_->descent(); + + int const descent = preview_->pimage_->descent(); + return display() ? descent + 12 : descent; }