A really small fix for alignment in tabular cells of multirow text-insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@937 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2000-07-28 14:59:26 +00:00
parent 68eddbdf73
commit 3c3ebc6828
2 changed files with 12 additions and 13 deletions

View File

@ -1546,8 +1546,8 @@ int InsetTabular::getMaxWidth(Painter & pain,
return -1;
int w = GetMaxWidthOfCell(pain, cell);
if (w > 0)
// because the inset then subtracts it's top_x
w += inset->x();
// because the inset then subtracts it's top_x and owner->x()
w += (inset->x() - top_x);
return w;
}

View File

@ -233,15 +233,7 @@ int InsetText::width(BufferView * bv, LyXFont const &) const
int InsetText::textWidth(Painter & pain) const
{
int w = getMaxWidth(pain, this);
if (w < 0) {
return w;
}
if (owner()) {
w = w - top_x + owner()->x();
return w;
}
w -= (2 * TEXT_TO_INSET_OFFSET);
return w - top_x;
return w;
}
@ -1207,9 +1199,16 @@ bool InsetText::checkAndActivateInset(BufferView * bv, int x, int y,
int InsetText::getMaxWidth(Painter & pain, UpdatableInset const * inset) const
{
int w = UpdatableInset::getMaxWidth(pain, inset);
if (w < 0)
if (w < 0) {
return w;
return w - (2*TEXT_TO_INSET_OFFSET);
}
if (owner()) {
w = w - top_x + owner()->x();
return w;
}
w -= (2 * TEXT_TO_INSET_OFFSET);
return w - top_x;
// return w - (2*TEXT_TO_INSET_OFFSET);
}