]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_fracinset.C
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_fracinset.C
index f5c90d775cf8ca08cbcd0d1df8ed36feb4d07190..c1f8f23ff4bfa78e7a965a23028803eee7206da4 100644 (file)
@@ -19,6 +19,12 @@ MathInset * MathFracInset::clone() const
 }
 
 
+MathFracInset * MathFracInset::asFracInset()
+{
+       return atop_ ? 0 : this;
+}
+
+
 void MathFracInset::metrics(MathMetricsInfo const & mi) const
 {
        MathMetricsInfo m = mi;
@@ -37,7 +43,7 @@ void MathFracInset::draw(Painter & pain, int x, int y) const
        xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 3 - 5);
        xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent()  + 3 - 5);
        if (!atop_)
-               pain.line(x + 2, y - 5, x + width() - 4, y - 5, LColor::mathline);
+               pain.line(x + 2, y - 5, x + width() - 4, y - 5, LColor::math);
 }
 
 
@@ -62,7 +68,7 @@ void MathFracInset::normalize(NormalStream & os) const
 
 void MathFracInset::maplize(MapleStream & os) const
 {
-       os << '(' << cell(0) << '/' << cell(1) << ')';
+       os << '(' << cell(0) << ")/(" << cell(1) << ')';
 }