]> git.lyx.org Git - features.git/commitdiff
remove the extra pixels required to accommodate the mathed active frame
authorAngus Leeming <leeming@lyx.org>
Tue, 16 Jul 2002 18:04:57 +0000 (18:04 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 16 Jul 2002 18:04:57 +0000 (18:04 +0000)
when in Preview mode.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4653 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/formula.C

index c814dfc410cecea2055f3f8d90104d102c6ba34b..782dcb1dd10bf52fe4b3efd3aa3b757afdf688df 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-16  Angus Leeming  <leeming@lyx.org>
+
+       * formula.C (ascent, descent, draw): remove the extra pixels
+       required to accommodate the mathed active frame when in Preview mode.
+
 2002-07-12  Angus Leeming  <leeming@lyx.org>
 
        * formula.C: use the new smart loading capabilities of the image loader.
index 67108d39bee14eb38a33db815487bf7d0ad3d8a2..ca2399cf223bff9eabbdcd38b3220cc7b638612f 100644 (file)
@@ -227,7 +227,7 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & font,
        MathPainterInfo pi(bv->painter());
 
        if (use_preview) {
-               pi.pain.image(x + 1, y - a + 1, w - 2, h - 2, 
+               pi.pain.image(x, y - a, w, h,
                              *(preview_->pimage_->image(*this, *bv)));
        } else {
                //pi.base.style = display() ? LM_ST_DISPLAY : LM_ST_TEXT;
@@ -442,14 +442,14 @@ bool InsetFormula::insetAllowed(Inset::Code code) const
 int InsetFormula::ascent(BufferView *, LyXFont const &) const
 {
        return preview_->usePreview() ?
-               1 + preview_->pimage_->ascent() : 1 + par_->ascent();
+               preview_->pimage_->ascent() : 1 + par_->ascent();
 }
 
 
 int InsetFormula::descent(BufferView *, LyXFont const &) const
 {
        return preview_->usePreview() ?
-               1 + preview_->pimage_->descent() : 1 + par_->descent();
+               preview_->pimage_->descent() : 1 + par_->descent();
 }