On Mon, Apr 04, 2005 at 11:24:54AM +0300, Martin Vermeer wrote:
> On Sun, Apr 03, 2005 at 05:57:42PM +0300, Martin Vermeer wrote:
> 
> ... 
>  
> > BTW there is still a bug in the math_splitinset: it has no setPosCache,
> > so you cannot click the cursor inside split/gathered/aligned/alignedat.
> > Should be fixed by adding a draw routine calling MathGridInset::draw 
> > and setPosCache. OK?
> > 
> > - Martin
> 
> Here's the patch. Unproblematic, goes in soon.
> 
> - Martin

This patch is in now.

I have a further patch which fixes up the remaining small issues of 
math drawing and corner marker placement that I have seen. I included
the math_tabularinset thing into this too. Please all, give this a test 
or look it over if mathed interests you.

Attached.

- Martin

Index: math_amsarrayinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_amsarrayinset.C,v
retrieving revision 1.28
diff -u -r1.28 math_amsarrayinset.C
--- math_amsarrayinset.C        4 Apr 2005 07:13:37 -0000       1.28
+++ math_amsarrayinset.C        4 Apr 2005 13:40:41 -0000
@@ -84,17 +84,17 @@
        if (m.base.style == LM_ST_DISPLAY)
                m.base.style = LM_ST_TEXT;
        MathGridInset::metrics(m, dim);
-       dim.wid += 12;
+       dim.wid += 14;
        dim_ = dim;
 }
 
 
 void MathAMSArrayInset::draw(PainterInfo & pi, int x, int y) const
 {
-       MathGridInset::drawWithMargin(pi, x, y, 6, 6);
+       MathGridInset::drawWithMargin(pi, x, y, 6, 8);
        int const yy = y - dim_.ascent();
        mathed_draw_deco(pi, x + 1, yy, 5, dim_.height(), name_left());
-       mathed_draw_deco(pi, x + dim_.width() - 6, yy, 5, dim_.height(), 
name_right());
+       mathed_draw_deco(pi, x + dim_.width() - 8, yy, 5, dim_.height(), 
name_right());
        setPosCache(pi, x, y);
 }
 
Index: math_arrayinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_arrayinset.C,v
retrieving revision 1.57
diff -u -r1.57 math_arrayinset.C
--- math_arrayinset.C   3 Apr 2005 12:07:49 -0000       1.57
+++ math_arrayinset.C   4 Apr 2005 13:40:41 -0000
@@ -82,6 +82,8 @@
 {
        ArrayChanger dummy(mi.base);
        MathGridInset::metrics(mi, dim);
+       dim.wid += 6;   
+       dim_ = dim;
 }
 
 
@@ -89,7 +91,7 @@
 {
        setPosCache(pi, x, y);
        ArrayChanger dummy(pi.base);
-       MathGridInset::draw(pi, x + 1, y);
+       MathGridInset::drawWithMargin(pi, x, y, 4, 2);
 }
 
 
Index: math_nestinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_nestinset.C,v
retrieving revision 1.147
diff -u -r1.147 math_nestinset.C
--- math_nestinset.C    16 Mar 2005 17:06:47 -0000      1.147
+++ math_nestinset.C    4 Apr 2005 13:40:41 -0000
@@ -128,6 +128,7 @@
                x += 2;
 }
 
+
 void MathNestInset::metrics(MetricsInfo const & mi) const
 {
        MetricsInfo m = mi;
Index: math_tabularinset.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_tabularinset.C,v
retrieving revision 1.14
diff -u -r1.14 math_tabularinset.C
--- math_tabularinset.C 3 Apr 2005 12:07:49 -0000       1.14
+++ math_tabularinset.C 4 Apr 2005 13:40:41 -0000
@@ -48,17 +48,19 @@
 }
 
 
-void MathTabularInset::metrics(MetricsInfo & mi, Dimension & /*dim*/) const
+void MathTabularInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        FontSetChanger dummy(mi.base, "textnormal");
-       return MathGridInset::metrics(mi);
+       MathGridInset::metrics(mi, dim);
+       dim.wid += 6;
+       dim_ = dim;
 }
 
 
 void MathTabularInset::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, "textnormal");
-       MathGridInset::draw(pi, x, y);
+       MathGridInset::drawWithMargin(pi, x, y, 4, 2);
 }
 
 

Attachment: pgpCZ5dlRQIlP.pgp
Description: PGP signature

Reply via email to