some pixel "corrections"

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2663 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-09-03 11:38:04 +00:00
parent 7abb718a67
commit 0db77361d9
3 changed files with 17 additions and 7 deletions

View File

@ -216,6 +216,7 @@ void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const
mathcursor->getPos(x, y);
x -= par()->xo();
y -= par()->yo();
y -= 3;
}
@ -232,10 +233,11 @@ void InsetFormulaBase::toggleInsetCursor(BufferView * bv)
mathcursor->getPos(x, y);
//x -= par()->xo();
y -= par()->yo();
y -= 3;
int asc;
int desc;
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, desc);
bv->showLockedInsetCursor(x, y, asc, desc);
int des;
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, des);
bv->showLockedInsetCursor(x, y, asc, des);
}
toggleCursorVisible();
@ -252,9 +254,9 @@ void InsetFormulaBase::showInsetCursor(BufferView * bv, bool)
x -= par()->xo();
y -= par()->yo();
int asc;
int desc;
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, desc);
bv->fitLockedInsetCursor(x, y, asc, desc);
int des;
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, des);
bv->fitLockedInsetCursor(x, y, asc, des);
}
toggleInsetCursor(bv);
}

View File

@ -114,6 +114,13 @@ void MathMatrixInset::metrics(MathStyles) const
if (l)
width_ += 30 + l;
}
// make it at least as high as the current font
int asc = 0;
int des = 0;
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, des);
ascent_ = std::max(ascent_, asc);
descent_ = std::max(descent_, des);
}

View File

@ -27,7 +27,8 @@ void MathXArray::metrics(MathStyles st) const
if (data_.empty())
return;
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, ascent_, descent_);
width_ = 0;
//lyxerr << "MathXArray::metrics(): '" << data_ << "'\n";