]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macro.C
halfway through fixing size of math in non-standard sizesd paragraohs like
[lyx.git] / src / mathed / math_macro.C
index 7e17da748cd20b867aa2a422b9411043e194fa92..f7a327c3f2d1815f672daca7b6fdc0804166a9be 100644 (file)
@@ -73,7 +73,7 @@ void MathMacro::metrics(MathMetricsInfo const & st) const
 {
        if (defining()) {
                size_ = st;
-               mathed_string_dim(LM_TC_TEX, size_.size, name(), ascent_, descent_, width_);
+               mathed_string_dim(LM_TC_TEX, size_, name(), ascent_, descent_, width_);
                return;
        }
 
@@ -85,12 +85,12 @@ void MathMacro::metrics(MathMetricsInfo const & st) const
                ascent_  = expanded_.ascent()  + 2;
                descent_ = expanded_.descent() + 2;
 
-               width_ +=  mathed_string_width(LM_TC_TEXTRM, size_.size, name()) + 10;
+               width_ +=  mathed_string_width(LM_TC_TEXTRM, size_, name()) + 10;
 
                int lasc;
                int ldes;
                int lwid;
-               mathed_string_dim(LM_TC_TEXTRM, size_.size, "#1: ", lasc, ldes, lwid);
+               mathed_string_dim(LM_TC_TEXTRM, size_, "#1: ", lasc, ldes, lwid);
 
                for (idx_type i = 0; i < nargs(); ++i) {
                        MathXArray const & c = xcell(i);
@@ -120,22 +120,22 @@ void MathMacro::draw(Painter & pain, int x, int y) const
        metrics(size_);
 
        if (defining()) {
-               drawStr(pain, LM_TC_TEX, size_.size, x, y, name());
+               drawStr(pain, LM_TC_TEX, size_, x, y, name());
                return;
        }
 
        if (editing()) {
                int h = y - ascent() + 2 + expanded_.ascent();
-               drawStr(pain, LM_TC_TEXTRM, size_.size, x + 3, h, name());
+               drawStr(pain, LM_TC_TEXTRM, size_, x + 3, h, name());
 
-               int const w = mathed_string_width(LM_TC_TEXTRM, size_.size, name());
+               int const w = mathed_string_width(LM_TC_TEXTRM, size_, name());
                expanded_.draw(pain, x + w + 12, h);
                h += expanded_.descent();
 
                int lasc;
                int ldes;
                int lwid;
-               mathed_string_dim(LM_TC_TEXTRM, size_.size, "#1: ", lasc, ldes, lwid);
+               mathed_string_dim(LM_TC_TEXTRM, size_, "#1: ", lasc, ldes, lwid);
 
                for (idx_type i = 0; i < nargs(); ++i) {
                        MathXArray const & c = xcell(i);
@@ -143,7 +143,7 @@ void MathMacro::draw(Painter & pain, int x, int y) const
                        c.draw(pain, x + lwid, h);
                        char str[] = "#1:";
                        str[1] += static_cast<char>(i);
-                       drawStr(pain, LM_TC_TEX, size_.size, x + 3, h, str);
+                       drawStr(pain, LM_TC_TEX, size_, x + 3, h, str);
                        h += std::max(c.descent(), ldes) + 5;
                }
                return;