mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
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:
parent
b1d75ead87
commit
e7689a2ed7
@ -73,7 +73,7 @@ void MathDecorationInset::metrics(MathMetricsInfo const & st) const
|
|||||||
ascent_ = xcell(0).ascent();
|
ascent_ = xcell(0).ascent();
|
||||||
descent_ = xcell(0).descent();
|
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()) {
|
if (upper()) {
|
||||||
dy_ = -ascent_ - dh_;
|
dy_ = -ascent_ - dh_;
|
||||||
@ -91,7 +91,7 @@ void MathDecorationInset::draw(Painter & pain, int x, int y) const
|
|||||||
if (wide())
|
if (wide())
|
||||||
mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_);
|
mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_);
|
||||||
else {
|
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_);
|
mathed_draw_deco(pain, x + (width_ - w) / 2, y + dy_, w, dh_, name_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -393,8 +393,8 @@ double const hline[] = {
|
|||||||
|
|
||||||
|
|
||||||
double const hline2[] = {
|
double const hline2[] = {
|
||||||
1, 0.1, 0.5, 0.3, 0.5,
|
1, 0.2, 0.5, 0.3, 0.5,
|
||||||
1, 0.7, 0.5, 0.9, 0.5,
|
1, 0.7, 0.5, 0.8, 0.5,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,16 +21,16 @@ MathXArray::MathXArray()
|
|||||||
void MathXArray::metrics(MathMetricsInfo const & mi) const
|
void MathXArray::metrics(MathMetricsInfo const & mi) const
|
||||||
{
|
{
|
||||||
size_ = mi;
|
size_ = mi;
|
||||||
|
|
||||||
|
if (data_.empty()) {
|
||||||
mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_);
|
mathed_char_dim(LM_TC_VAR, mi, 'I', ascent_, descent_, width_);
|
||||||
|
|
||||||
if (data_.empty())
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
math_font_max_dim(LM_TC_TEXTRM, mi, ascent_, descent_);
|
ascent_ = 0;
|
||||||
|
descent_ = 0;
|
||||||
width_ = 0;
|
width_ = 0;
|
||||||
|
|
||||||
//lyxerr << "MathXArray::metrics(): '" << data_ << "'\n";
|
|
||||||
|
|
||||||
for (const_iterator it = begin(); it != end(); ++it) {
|
for (const_iterator it = begin(); it != end(); ++it) {
|
||||||
MathInset const * p = it->nucleus();
|
MathInset const * p = it->nucleus();
|
||||||
MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);
|
MathScriptInset const * q = (it + 1 == end()) ? 0 : asScript(it);
|
||||||
|
Loading…
Reference in New Issue
Block a user