From: Martin Vermeer Date: Mon, 4 Apr 2005 22:11:53 +0000 (+0000) Subject: Final touches, corner markers & clickability in math X-Git-Tag: 1.6.10~14427 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e9ac548c9ad7995750d06e5710a69c95b39d67d8;p=features.git Final touches, corner markers & clickability in math git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9778 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index ae984992ca..7c7870b7a7 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,13 @@ +2005-04-05 Martin Vermeer + + * 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 * math_splitinset.[Ch]: add draw method calling setPosCache, diff --git a/src/mathed/math_amsarrayinset.C b/src/mathed/math_amsarrayinset.C index 468f97bea3..0c93b40a4f 100644 --- a/src/mathed/math_amsarrayinset.C +++ b/src/mathed/math_amsarrayinset.C @@ -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); } diff --git a/src/mathed/math_arrayinset.C b/src/mathed/math_arrayinset.C index 8bc8b449ea..f2e76a3e63 100644 --- a/src/mathed/math_arrayinset.C +++ b/src/mathed/math_arrayinset.C @@ -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); } diff --git a/src/mathed/math_decorationinset.C b/src/mathed/math_decorationinset.C index 3019710a6e..eddbbf7ce1 100644 --- a/src/mathed/math_decorationinset.C +++ b/src/mathed/math_decorationinset.C @@ -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); } diff --git a/src/mathed/math_deliminset.C b/src/mathed/math_deliminset.C index ee5dc03f93..7832ddbab6 100644 --- a/src/mathed/math_deliminset.C +++ b/src/mathed/math_deliminset.C @@ -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); } diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index dac2f28707..9c66c3d898 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -128,6 +128,7 @@ void MathNestInset::getCursorPos(CursorSlice const & sl, x += 2; } + void MathNestInset::metrics(MetricsInfo const & mi) const { MetricsInfo m = mi; diff --git a/src/mathed/math_tabularinset.C b/src/mathed/math_tabularinset.C index e67203f255..eb4fe3e8eb 100644 --- a/src/mathed/math_tabularinset.C +++ b/src/mathed/math_tabularinset.C @@ -48,17 +48,19 @@ auto_ptr 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); }