On Wed, Mar 17, 2010 at 1:32 AM, Uwe Stöhr <[email protected]> wrote:
>> (and where can we set these valignment parameters?)
>
> I don't understand. The valignment is set either via the context menu or the
> tabular dialog.
these are greyed out and not active here (anyone else see this?)
> These can be shifted to an int routine that returns cy (and y, in case the
> row height needs to be increased). If you do this, please add some comments
> describing what the routine is for and what it does why. (the tabular code
> needs in my opinion more comments).
please do this yourself
the following code can move to a updateRowHeights() which can be
called in metrics
// determine the highest cell because its valignment sets the row
valignment
// also store its height
for (row_type r = 0; r < tabular.nrows(); ++r) {
int nx = x;
for (col_type c = 0; c < tabular.ncols(); ++c) {
if (tabular.cell_info[r][c].height >=
tabular.row_info[r].maxheight) {
tabular.row_info[r].maxheight =
tabular.cell_info[r][c].height;
switch
(tabular.getVAlignment(tabular.cellIndex(r, c))) {
case Tabular::LYX_VALIGN_TOP:
tabular.row_info[r].valignment
= Tabular::LYX_VALIGN_TOP;
break;
case Tabular::LYX_VALIGN_MIDDLE:
tabular.row_info[r].valignment
= Tabular::LYX_VALIGN_MIDDLE;
break;
case Tabular::LYX_VALIGN_BOTTOM:
tabular.row_info[r].valignment
= Tabular::LYX_VALIGN_BOTTOM;
break;
}
}
}
}
btw, i do not understand the switch statement. for every cell we are
changing the row valignment. what's the point?
the othercode you added can go to textVOffset i think.
i must say that i do not like these nested switch statements. it is
also not clear to me why we need the magic numbers.
otherwise i can revert the commit and look at it myself. the problem
is, as i said, that i cannot set vertical alignment. it would be nice
to know if i am the only one...
thanks, edwin