]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacroTemplate.cpp
Improve spacing of BOX elements
[lyx.git] / src / mathed / MathMacroTemplate.cpp
index 31250e29df547156c91d650e72659e832fe95ad9..42d81772b737755ddcb8c89af2bea67a8fe69de7 100644 (file)
@@ -269,7 +269,7 @@ Inset * InsetMathWrapper::clone() const
 void InsetMathWrapper::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        value_->metrics(mi, dim);
-       //metricsMarkers2(dim);
+       //metricsMarkers2(mi, dim);
 }
 
 
@@ -544,7 +544,7 @@ void MathMacroTemplate::createLook(int args) const
 void MathMacroTemplate::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        Changer dummy1 = mi.base.changeFontSet("mathnormal");
-       Changer dummy2 = mi.base.changeStyle(LM_ST_TEXT);
+       Changer dummy2 = mi.base.font.changeStyle(LM_ST_TEXT);
 
        // valid macro?
        MacroData const * macro = 0;
@@ -588,7 +588,7 @@ void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const
        // FIXME: Calling Changer on the same object repeatedly is inefficient.
        Changer dummy0 = pi.base.font.changeColor(Color_math);
        Changer dummy1 = pi.base.changeFontSet("mathnormal");
-       Changer dummy2 = pi.base.changeStyle(LM_ST_TEXT);
+       Changer dummy2 = pi.base.font.changeStyle(LM_ST_TEXT);
 
        setPosCache(pi, x, y);
        Dimension const dim = dimension(*pi.base.bv);
@@ -597,7 +597,7 @@ void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const
        int const a = y - dim.asc + 1;
        int const w = dim.wid - 2;
        int const h = dim.height() - 2;
-       pi.pain.rectangle(x, a, w, h, Color_mathframe);
+       pi.pain.rectangle(x + 1, a, w, h, Color_mathframe);
 
        // just to be sure: set some dummy values for coord cache
        for (idx_type i = 0; i < nargs(); ++i)
@@ -1172,7 +1172,7 @@ void MathMacroTemplate::read(Lexer & lex)
 void MathMacroTemplate::write(ostream & os) const
 {
        odocstringstream oss;
-       otexrowstream ots(oss, false);
+       otexrowstream ots(oss);
        WriteStream wi(ots, false, false, WriteStream::wsDefault);
        oss << "FormulaMacro\n";
        write(wi);