]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathColor.cpp
Cell in delimiter inset should not be tight
[lyx.git] / src / mathed / InsetMathColor.cpp
index cbf6cb5d860cf455e92fcbe34f1f798f277ab7ef..d665734b5182893b7a0da3a58e609bc59c79df12 100644 (file)
@@ -29,14 +29,14 @@ using namespace lyx::support;
 namespace lyx {
 
 InsetMathColor::InsetMathColor(Buffer * buf, bool oldstyle, ColorCode color)
-       : InsetMathNest(buf, 1), w_(0), oldstyle_(oldstyle),
+       : InsetMathNest(buf, 1), oldstyle_(oldstyle),
          color_(from_utf8(lcolor.getLaTeXName(color)))
 {}
 
 
 InsetMathColor::InsetMathColor(Buffer * buf, bool oldstyle,
                docstring const & color)
-       : InsetMathNest(buf, 1), w_(0), oldstyle_(oldstyle), color_(color)
+       : InsetMathNest(buf, 1), oldstyle_(oldstyle), color_(color)
 {}
 
 
@@ -49,7 +49,6 @@ Inset * InsetMathColor::clone() const
 void InsetMathColor::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
-       metricsMarkers(dim);
 }
 
 
@@ -57,10 +56,8 @@ void InsetMathColor::draw(PainterInfo & pi, int x, int y) const
 {
        ColorCode origcol = pi.base.font.color();
        pi.base.font.setColor(lcolor.getFromLaTeXName(to_utf8(color_)));
-       cell(0).draw(pi, x + 1, y);
+       cell(0).draw(pi, x, y);
        pi.base.font.setColor(origcol);
-       drawMarkers(pi, x, y);
-       setPosCache(pi, x, y);
 }
 
 
@@ -88,8 +85,10 @@ void InsetMathColor::validate(LaTeXFeatures & features) const
                        case Color_teal:
                        case Color_violet:
                                features.require("xcolor");
+                               break;
                        default:
                                features.require("color");
+                               break;
                }
        }
 }