From f5fe3c17be0a66b32085585962877dfc2dae9140 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 17 Nov 2016 16:17:49 +0100 Subject: [PATCH] Reduce horizontal spacing for simple inline equations --- src/mathed/InsetMathHull.cpp | 18 ++++++++++++++++++ src/mathed/InsetMathHull.h | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 851c1e6167..38cdd26427 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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(); +} + + ///////////////////////////////////////////////////////////////////// diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index bc574b9650..bae26530c3 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -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; -- 2.39.2