X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathSpace.cpp;h=7d44accf7bd2146919a953d62332611c67dd73aa;hb=11a6b3c4c7a031fd3776f53c9c43f62116933cea;hp=1dfe58d0a9779814972c920b6158db222a1bf4fe;hpb=ed858d73e57ce7aa89e38c1bc4d799362edb0227;p=lyx.git diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index 1dfe58d0a9..7d44accf7b 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -15,11 +15,10 @@ #include "MathStream.h" #include "LaTeXFeatures.h" -#include "Color.h" #include "frontends/Painter.h" -using std::string; +using namespace std; namespace lyx { @@ -79,15 +78,9 @@ Inset * InsetMathSpace::clone() const } -bool InsetMathSpace::metrics(MetricsInfo &, Dimension & dim) const +void InsetMathSpace::metrics(MetricsInfo &, Dimension & dim) const { - dim.wid = width(); - dim.asc = ascent(); - dim.des = descent(); - if (dim_ == dim) - return false; - dim_ = dim; - return true; + dim = dim_; } @@ -100,14 +93,14 @@ void InsetMathSpace::draw(PainterInfo & pi, int x, int y) const int xp[4]; int yp[4]; - int w = width(); + int w = dim_.wid; xp[0] = ++x; yp[0] = y - 3; xp[1] = x; yp[1] = y; xp[2] = x + w - 2; yp[2] = y; xp[3] = x + w - 2; yp[3] = y - 3; - pi.pain.lines(xp, yp, 4, (space_ < 3) ? Color::latex : Color::math); + pi.pain.lines(xp, yp, 4, (space_ < 3) ? Color_latex : Color_math); }