]> git.lyx.org Git - features.git/commitdiff
Reduce horizontal spacing for simple inline equations
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 17 Nov 2016 15:17:49 +0000 (16:17 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 24 Mar 2017 09:22:32 +0000 (10:22 +0100)
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h

index 851c1e6167313fad2465b528135e43e0e096649f..38cdd26427ee63c5b34adcfbb5c7cdbabd7e4088 100644 (file)
@@ -2120,6 +2120,24 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
+int InsetMathHull::leftMargin() const
+{
+       return (getType() == hullSimple) ? 0 : InsetMathGrid::leftMargin();
+}
+
+
+int InsetMathHull::rightMargin() const
+{
+       return (getType() == hullSimple) ? 0 : InsetMathGrid::rightMargin();
+}
+
+
+int InsetMathHull::border() const
+{
+       return (getType() == hullSimple) ? 0 : InsetMathGrid::border();
+}
+
+
 /////////////////////////////////////////////////////////////////////
 
 
index bc574b9650ee72a8387ac16113d1d3b27215c610..bae26530c3c5ac824da884cef448f3fff1aa7042 100644 (file)
@@ -200,6 +200,12 @@ protected:
        /// do we want to handle this event?
        bool getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & status) const;
+       /// override to set to 0 for inline equation
+       int leftMargin() const;
+       /// override to set to 0 for inline equation
+       int rightMargin() const;
+       /// override to set to 0 for inline equation
+       int border() const;
        ///
        docstring eolString(row_type row, bool fragile, bool latex,
                        bool last_eoln) const;