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
This commit is contained in:
André Pönitz 2002-02-01 15:53:34 +00:00
parent b1d75ead87
commit e7689a2ed7
3 changed files with 10 additions and 10 deletions

View File

@ -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_);
}
}

View File

@ -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
};

View File

@ -21,16 +21,16 @@ MathXArray::MathXArray()
void MathXArray::metrics(MathMetricsInfo const & mi) const
{
size_ = mi;
if (data_.empty()) {
mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_);
if (data_.empty())
return;
}
math_font_max_dim(LM_TC_TEXTRM, mi, ascent_, descent_);
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);