]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/button_inset.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / button_inset.C
index 0034107f42930e9a54b58ef85ffa50d52f753ea8..4585b817126a994f4ba40278fcc9870aa4d6dfb9 100644 (file)
@@ -1,7 +1,9 @@
+
 #include <config.h>
 
 #include "button_inset.h"
 #include "math_support.h"
+#include "math_metricsinfo.h"
 #include "frontends/Painter.h"
 
 #include <algorithm>
@@ -19,9 +21,9 @@ void ButtonInset::metrics(MathMetricsInfo & mi) const
        MathFontSetChanger dummy(mi.base, "textnormal");
        if (editing()) {
                MathNestInset::metrics(mi);
-               dim_.w = xcell(0).width() + xcell(1).width() + 4;
-               dim_.a = max(xcell(0).ascent(), xcell(1).ascent());
-               dim_.d = max(xcell(0).descent(), xcell(1).descent());
+               dim_.w = cell(0).width() + cell(1).width() + 4;
+               dim_.a = max(cell(0).ascent(), cell(1).ascent());
+               dim_.d = max(cell(0).descent(), cell(1).descent());
        } else {
                mathed_string_dim(mi.base.font, screenLabel(), dim_);
                dim_.w += 10;
@@ -33,11 +35,10 @@ void ButtonInset::draw(MathPainterInfo & pi, int x, int y) const
 {
        MathFontSetChanger dummy(pi.base, "textnormal");
        if (editing()) {
-               xcell(0).draw(pi, x, y);
-               xcell(1).draw(pi, x + xcell(0).width() + 2, y);
+               cell(0).draw(pi, x, y);
+               cell(1).draw(pi, x + cell(0).width() + 2, y);
                mathed_draw_framebox(pi, x, y, this);
        } else {
-               pi.pain.buttonText(x + 2, y, screenLabel(),
-                       pi.base.font);
+               pi.pain.buttonText(x + 2, y, screenLabel(), pi.base.font);
        }
 }