]> git.lyx.org Git - features.git/commitdiff
Final touches, corner markers & clickability in math
authorMartin Vermeer <martin.vermeer@hut.fi>
Mon, 4 Apr 2005 22:11:53 +0000 (22:11 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Mon, 4 Apr 2005 22:11:53 +0000 (22:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9778 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/math_amsarrayinset.C
src/mathed/math_arrayinset.C
src/mathed/math_decorationinset.C
src/mathed/math_deliminset.C
src/mathed/math_nestinset.C
src/mathed/math_tabularinset.C

index ae984992caf11650383d65f00f5a0982410cd38f..7c7870b7a7760b8e53dcbd6c889483ee87ad3bb0 100644 (file)
@@ -1,3 +1,13 @@
+2005-04-05  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * math_amsarrayinset.C:
+       * math__arrayinset.C:
+       * math_decorationinset.C:
+       * math_deliminset.C:
+       * math_nestinset.C:
+       * math_tabularinset.C: Final touch on various corner marker
+       positions and inset clickability in math
+
 2005-04-04  Martin Vermeer  <martin.vermeer@hut.fi>
 
        * math_splitinset.[Ch]: add draw method calling setPosCache,
index 468f97bea308d5f121a9ca4d77dae1b325d9e7f1..0c93b40a4f3225a8a582499e3b6f9b9c77169bb9 100644 (file)
@@ -84,17 +84,17 @@ void MathAMSArrayInset::metrics(MetricsInfo & mi, Dimension & dim) const
        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 8bc8b449ea561b733bc6e8948cc87d6a653ec058..f2e76a3e63bf321b5c1c264ae7c35e638c684bb6 100644 (file)
@@ -82,6 +82,8 @@ void MathArrayInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        ArrayChanger dummy(mi.base);
        MathGridInset::metrics(mi, dim);
+       dim.wid += 6;   
+       dim_ = dim;
 }
 
 
@@ -89,7 +91,7 @@ void MathArrayInset::draw(PainterInfo & pi, int x, int y) const
 {
        setPosCache(pi, x, y);
        ArrayChanger dummy(pi.base);
-       MathGridInset::draw(pi, x + 1, y);
+       MathGridInset::drawWithMargin(pi, x, y, 4, 2);
 }
 
 
index 3019710a6e31292f9de9ed229f711323b100ea70..eddbbf7ce17b4654616df51d1a079ecd04692254 100644 (file)
@@ -128,6 +128,7 @@ void MathDecorationInset::draw(PainterInfo & pi, int x, int y) const
                mathed_draw_deco(pi, x + 1 + (cell(0).width() - dw_) / 2,
                        y + dy_, dw_, dh_, key_->name);
        drawMarkers(pi, x, y);
+       setPosCache(pi, x, y);
 }
 
 
index ee5dc03f933bb832fed5826b7b6bf50c6ad567d4..7832ddbab68221932db976e012df74edf52bc324 100644 (file)
@@ -111,6 +111,7 @@ void MathDelimInset::draw(PainterInfo & pi, int x, int y) const
        mathed_draw_deco(pi, x + 4, b, dw_, dim_.height(), left_);
        mathed_draw_deco(pi, x + dim_.width() - dw_ - 4,
                b, dw_, dim_.height(), right_);
+       setPosCache(pi, x, y);
 }
 
 
index dac2f2870743cd7f2b7a035de5c6d73b5f6d593d..9c66c3d898c5d8c46937574143b932c7199ede5c 100644 (file)
@@ -128,6 +128,7 @@ void MathNestInset::getCursorPos(CursorSlice const & sl,
                x += 2;
 }
 
+
 void MathNestInset::metrics(MetricsInfo const & mi) const
 {
        MetricsInfo m = mi;
index e67203f2559160d33e6773c083e06fb9da615eb5..eb4fe3e8eb374f89410bdba729e5c3cef20c2911 100644 (file)
@@ -48,17 +48,19 @@ auto_ptr<InsetBase> MathTabularInset::doClone() const
 }
 
 
-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);
 }