Wrong subtraction order lead to the "extra" space available (instead
of the extra space *required*) in a rowspan object being redistributed back into the span, leading to a near-doubling of the size for small objects with large span ranges.
This commit is contained in:
parent
4238a46faa
commit
389e23b867
1 changed files with 2 additions and 2 deletions
|
@ -315,7 +315,7 @@ void LayoutWidget::doTable(bool doLayout, int* w, int* h)
|
|||
int total = 0;
|
||||
for(j=0; j<cell->rspan; j++)
|
||||
total += rowSizes[cell->row + j];
|
||||
int extra = total - cell->h;
|
||||
int extra = cell->h - total;
|
||||
if(extra > 0) {
|
||||
for(j=0; j<cell->rspan; j++) {
|
||||
int chunk = extra / (cell->rspan - j);
|
||||
|
@ -328,7 +328,7 @@ void LayoutWidget::doTable(bool doLayout, int* w, int* h)
|
|||
int total = 0;
|
||||
for(j=0; j<cell->cspan; j++)
|
||||
total += colSizes[cell->col + j];
|
||||
int extra = total - cell->w;
|
||||
int extra = cell->w - total;
|
||||
if(extra > 0) {
|
||||
for(j=0; j<cell->cspan; j++) {
|
||||
int chunk = extra / (cell->cspan - j);
|
||||
|
|
Loading…
Reference in a new issue