mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 03:03:06 +00:00
fix 'purple box has wrong size in x_{}'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2726 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a4eb2c3040
commit
cd093e5884
@ -206,7 +206,8 @@ MathScriptInset * MathAtom::down() const
|
|||||||
|
|
||||||
int MathAtom::dy0() const
|
int MathAtom::dy0() const
|
||||||
{
|
{
|
||||||
lyx::Assert(down());
|
if (!down())
|
||||||
|
return ndes();
|
||||||
int des = down()->ascent();
|
int des = down()->ascent();
|
||||||
if (hasLimits())
|
if (hasLimits())
|
||||||
des += ndes() + 2;
|
des += ndes() + 2;
|
||||||
@ -218,7 +219,8 @@ int MathAtom::dy0() const
|
|||||||
|
|
||||||
int MathAtom::dy1() const
|
int MathAtom::dy1() const
|
||||||
{
|
{
|
||||||
lyx::Assert(up());
|
if (!up())
|
||||||
|
return nasc();
|
||||||
int asc = up()->descent();
|
int asc = up()->descent();
|
||||||
if (hasLimits())
|
if (hasLimits())
|
||||||
asc += nasc() + 2;
|
asc += nasc() + 2;
|
||||||
@ -252,19 +254,13 @@ int MathAtom::dxx() const
|
|||||||
|
|
||||||
int MathAtom::ascent() const
|
int MathAtom::ascent() const
|
||||||
{
|
{
|
||||||
int asc = nasc();
|
return dy1() + (up() ? up()->ascent() : 0);
|
||||||
if (up())
|
|
||||||
asc += hasLimits() ? up()->height() + 2 : up()->ascent();
|
|
||||||
return asc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int MathAtom::descent() const
|
int MathAtom::descent() const
|
||||||
{
|
{
|
||||||
int des = ndes();
|
return dy0() + (down() ? down()->descent() : 0);
|
||||||
if (down())
|
|
||||||
des += hasLimits() ? down()->height() + 2 : down()->descent();
|
|
||||||
return des;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@ void MathScriptInset::metrics(MathStyles st) const
|
|||||||
width_ = xcell(0).width();
|
width_ = xcell(0).width();
|
||||||
ascent_ = xcell(0).ascent();
|
ascent_ = xcell(0).ascent();
|
||||||
descent_ = xcell(0).descent();
|
descent_ = xcell(0).descent();
|
||||||
|
//lyxerr << "MathScriptInset::metrics: w: " << width_ << " a: " << ascent_
|
||||||
|
// << " d: " << descent_ << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,6 +36,8 @@ void MathXArray::metrics(MathStyles st) const
|
|||||||
descent_ = std::max(descent_, p->descent());
|
descent_ = std::max(descent_, p->descent());
|
||||||
width_ += p->width();
|
width_ += p->width();
|
||||||
}
|
}
|
||||||
|
//lyxerr << "MathXArray::metrics(): '" << ascent_ << " "
|
||||||
|
// << descent_ << " " << width_ << "'\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user