]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathHull.cpp
Show properly on screen "indented" maths.
[features.git] / src / mathed / InsetMathHull.cpp
index 38cdd26427ee63c5b34adcfbb5c7cdbabd7e4088..3e897df0e1724581202f689b91e7af31d6fb9b68 100644 (file)
@@ -993,12 +993,31 @@ Inset::DisplayType InsetMathHull::display() const
        case hullEquation:
        case hullMultline:
        case hullGather:
-               return AlignCenter;
+               if (buffer().params().is_math_indent)
+                       return AlignLeft;
+               else
+                       return AlignCenter;
        }
        // avoid warning
        return AlignCenter;
 }
 
+
+int InsetMathHull::indent(BufferView const & bv) const
+{
+       // FIXME: set this in the textclass. This value is what the article class uses.
+       static Length default_indent(2.5, Length::EM);
+       if (buffer().params().is_math_indent) {
+               Length const & len = buffer().params().getMathIndent();
+               if (len.empty())
+                       return bv.inPixels(default_indent);
+               else
+                       return bv.inPixels(len);
+       } else
+               return Inset::indent(bv);
+}
+
+
 bool InsetMathHull::numberedType() const
 {
        switch (type_) {