]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathTabular.cpp
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / InsetMathTabular.cpp
index 2c814a38c6511ecf654ef5c693dd008dbeca9d29..e4123a565509cd6dd0b96875a42084a0e102104d 100644 (file)
@@ -16,6 +16,8 @@
 #include "MathStream.h"
 #include "MathStream.h"
 
+#include "MetricsInfo.h"
+
 #include "support/lstrings.h"
 
 #include <ostream>
@@ -43,24 +45,15 @@ Inset * InsetMathTabular::clone() const
 
 void InsetMathTabular::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       FontSetChanger dummy(mi.base, "textnormal");
+       Changer dummy = mi.base.changeFontSet("textnormal");
        InsetMathGrid::metrics(mi, dim);
-       dim.wid += 6;
-}
-
-
-Dimension const InsetMathTabular::dimension(BufferView const & bv) const
-{
-       Dimension dim = InsetMathGrid::dimension(bv);
-       dim.wid += 6;
-       return dim;
 }
 
 
 void InsetMathTabular::draw(PainterInfo & pi, int x, int y) const
 {
-       FontSetChanger dummy(pi.base, "textnormal");
-       InsetMathGrid::drawWithMargin(pi, x, y, 4, 2);
+       Changer dummy = pi.base.changeFontSet("textnormal");
+       InsetMathGrid::draw(pi, x, y);
 }