]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_dotsinset.C
fix #1073
[lyx.git] / src / mathed / math_dotsinset.C
index c939ac9892c2f004e19a9dec97653f1159ffd58e..c322ada2b3b81b870fc550e3c15e3fa3ca9f3134 100644 (file)
@@ -1,8 +1,5 @@
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_dotsinset.h"
 #include "math_mathmlstream.h"
@@ -22,24 +19,25 @@ MathInset * MathDotsInset::clone() const
 }
 
 
-void MathDotsInset::metrics(MathMetricsInfo & mi) const
+void MathDotsInset::metrics(MetricsInfo & mi) const
 {
        mathed_char_dim(mi.base.font, 'M', dim_);
-       if (key_->name == "ldots" || key_->name == "dotsm") 
-               dh_ = 0;
-       else if (key_->name == "cdots" || key_->name == "dotsb"
+       dh_ = 0;
+       if (key_->name == "cdots" || key_->name == "dotsb"
                        || key_->name == "dotsm" || key_->name == "dotsi")
                dh_ = ascent() / 2;
        else if (key_->name == "dotsc")
                dh_ = ascent() / 4;
-       else if (key_->name == "vdots")
-               dim_.w /= 2;
+       else if (key_->name == "vdots") {
+               dim_.w = (dim_.w / 2) + 1;
+               dh_ = ascent();
+       }
        else if (key_->name == "ddots")
                dh_ = ascent();
 }
 
 
-void MathDotsInset::draw(MathPainterInfo & pain, int x, int y) const
+void MathDotsInset::draw(PainterInfo & pain, int x, int y) const
 {
        mathed_draw_deco(pain, x + 2, y - dh_, width() - 2, ascent(), key_->name);
        if (key_->name == "vdots" || key_->name == "ddots")