]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_fboxinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_fboxinset.C
index a54e64370ecc2d0a7b87b2557de4bbe33d54f3d7..6fbbb38c8b5d0d185578b011f87a2fbed30ad083 100644 (file)
@@ -28,7 +28,7 @@ MathFboxInset::MathFboxInset()
 {}
 
 
-auto_ptr<InsetBase> MathFboxInset::clone() const
+auto_ptr<InsetBase> MathFboxInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathFboxInset(*this));
 }
@@ -44,7 +44,7 @@ void MathFboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
        cell(0).metrics(mi, dim);
-       metricsMarkers(dim, 5); // 5 pixels margin
+       metricsMarkers(dim, 3); // 1 pixel space, 1 frame, 1 space
        dim_ = dim;
 }
 
@@ -54,7 +54,7 @@ void MathFboxInset::draw(PainterInfo & pi, int x, int y) const
        pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
                dim_.width() - 2, dim_.height() - 2, LColor::foreground);
        FontSetChanger dummy(pi.base, "textnormal");
-       cell(0).draw(pi, x + 5, y);
+       cell(0).draw(pi, x + 3, y);
        setPosCache(pi, x, y);
 }
 
@@ -75,4 +75,3 @@ void MathFboxInset::infoize(std::ostream & os) const
 {
        os << "FBox: ";
 }
-