mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
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:
parent
7abb718a67
commit
0db77361d9
@ -216,6 +216,7 @@ void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const
|
|||||||
mathcursor->getPos(x, y);
|
mathcursor->getPos(x, y);
|
||||||
x -= par()->xo();
|
x -= par()->xo();
|
||||||
y -= par()->yo();
|
y -= par()->yo();
|
||||||
|
y -= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -232,10 +233,11 @@ void InsetFormulaBase::toggleInsetCursor(BufferView * bv)
|
|||||||
mathcursor->getPos(x, y);
|
mathcursor->getPos(x, y);
|
||||||
//x -= par()->xo();
|
//x -= par()->xo();
|
||||||
y -= par()->yo();
|
y -= par()->yo();
|
||||||
|
y -= 3;
|
||||||
int asc;
|
int asc;
|
||||||
int desc;
|
int des;
|
||||||
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, desc);
|
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, des);
|
||||||
bv->showLockedInsetCursor(x, y, asc, desc);
|
bv->showLockedInsetCursor(x, y, asc, des);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleCursorVisible();
|
toggleCursorVisible();
|
||||||
@ -252,9 +254,9 @@ void InsetFormulaBase::showInsetCursor(BufferView * bv, bool)
|
|||||||
x -= par()->xo();
|
x -= par()->xo();
|
||||||
y -= par()->yo();
|
y -= par()->yo();
|
||||||
int asc;
|
int asc;
|
||||||
int desc;
|
int des;
|
||||||
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, desc);
|
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, asc, des);
|
||||||
bv->fitLockedInsetCursor(x, y, asc, desc);
|
bv->fitLockedInsetCursor(x, y, asc, des);
|
||||||
}
|
}
|
||||||
toggleInsetCursor(bv);
|
toggleInsetCursor(bv);
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,13 @@ void MathMatrixInset::metrics(MathStyles) const
|
|||||||
if (l)
|
if (l)
|
||||||
width_ += 30 + 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ void MathXArray::metrics(MathStyles st) const
|
|||||||
if (data_.empty())
|
if (data_.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
math_font_max_dim(LM_TC_TEXTRM, LM_ST_TEXT, ascent_, descent_);
|
||||||
width_ = 0;
|
width_ = 0;
|
||||||
|
|
||||||
//lyxerr << "MathXArray::metrics(): '" << data_ << "'\n";
|
//lyxerr << "MathXArray::metrics(): '" << data_ << "'\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user