]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formula.C
Fix.
[lyx.git] / src / mathed / formula.C
index 670cb182b110b03cb0ad24d0b8ecbd59d6ba7e13..b586aea753727ddc281985cd2879ff12701b7e4c 100644 (file)
@@ -13,9 +13,6 @@
 *   the GNU General Public Licence version 2 or later.
 */
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include <config.h>
 
@@ -142,7 +139,7 @@ int InsetFormula::latex(Buffer const *, ostream & os, bool fragile, bool) const
 
 int InsetFormula::ascii(Buffer const *, ostream & os, int) const
 {
-       if (display()) {
+       if (0 && display()) {
                TextMetricsInfo mi;
                par()->metricsT(mi);
                TextPainter tpain(par()->width(), par()->height());
@@ -213,7 +210,7 @@ void InsetFormula::draw(BufferView * bv, LyXFont const & font,
        MathPainterInfo pi(bv->painter());
 
        if (use_preview) {
-               pi.pain.image(x, y - a, w, h,
+               pi.pain.image(x + 1, y - a, w, h,   // one pixel gap in front
                              *(preview_->pimage()->image(*this, *bv)));
        } else {
                pi.base.style = LM_ST_TEXT;
@@ -291,7 +288,8 @@ int InsetFormula::width(BufferView * bv, LyXFont const & font) const
 {
        metrics(bv, font);
        return preview_->previewReady() ?
-               preview_->pimage()->width() : par_->width();
+               1 + preview_->pimage()->width() : par_->width();
+               // insert a one pixel gap in front of the formula
 }