From e7689a2ed7dfbdde6f7eac23fd50c5bce83ffac3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 1 Feb 2002 15:53:34 +0000 Subject: [PATCH] draw decorations closer to the place where LaTeX puts them git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3473 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_decorationinset.C | 4 ++-- src/mathed/math_support.C | 4 ++-- src/mathed/math_xdata.C | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/mathed/math_decorationinset.C b/src/mathed/math_decorationinset.C index bbfdf2005f..26193af9c5 100644 --- a/src/mathed/math_decorationinset.C +++ b/src/mathed/math_decorationinset.C @@ -73,7 +73,7 @@ void MathDecorationInset::metrics(MathMetricsInfo const & st) const ascent_ = xcell(0).ascent(); descent_ = xcell(0).descent(); - dh_ = 5; //mathed_char_height(LM_TC_VAR, size(), 'I', ascent_, descent_); + dh_ = 6; //mathed_char_height(LM_TC_VAR, size(), 'I', ascent_, descent_); if (upper()) { dy_ = -ascent_ - dh_; @@ -91,7 +91,7 @@ void MathDecorationInset::draw(Painter & pain, int x, int y) const if (wide()) mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_); else { - int w = 2 + mathed_char_width(LM_TC_VAR, size_, 'x'); + int w = mathed_char_width(LM_TC_VAR, size_, 'x'); mathed_draw_deco(pain, x + (width_ - w) / 2, y + dy_, w, dh_, name_); } } diff --git a/src/mathed/math_support.C b/src/mathed/math_support.C index 8f437afb68..e562200ac6 100644 --- a/src/mathed/math_support.C +++ b/src/mathed/math_support.C @@ -393,8 +393,8 @@ double const hline[] = { double const hline2[] = { - 1, 0.1, 0.5, 0.3, 0.5, - 1, 0.7, 0.5, 0.9, 0.5, + 1, 0.2, 0.5, 0.3, 0.5, + 1, 0.7, 0.5, 0.8, 0.5, 0 }; diff --git a/src/mathed/math_xdata.C b/src/mathed/math_xdata.C index 998c3e0130..9c2d059f13 100644 --- a/src/mathed/math_xdata.C +++ b/src/mathed/math_xdata.C @@ -21,16 +21,16 @@ MathXArray::MathXArray() void MathXArray::metrics(MathMetricsInfo const & mi) const { size_ = mi; - mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_); - if (data_.empty()) + if (data_.empty()) { + mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_); return; + } - math_font_max_dim(LM_TC_TEXTRM, mi, ascent_, descent_); - width_ = 0; + ascent_ = 0; + descent_ = 0; + width_ = 0; - //lyxerr << "MathXArray::metrics(): '" << data_ << "'\n"; - for (const_iterator it = begin(); it != end(); ++it) { MathInset const * p = it->nucleus(); MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it); -- 2.39.2