Showing
2 changed files
with
15 additions
and
4 deletions
| @@ -603,11 +603,16 @@ class Table extends Widget implements SpanningWidget { | @@ -603,11 +603,16 @@ class Table extends Widget implements SpanningWidget { | ||
| 603 | continue; | 603 | continue; |
| 604 | } | 604 | } |
| 605 | 605 | ||
| 606 | - final child = row.children.first; | ||
| 607 | if (row.decoration != null) { | 606 | if (row.decoration != null) { |
| 607 | + var y = double.infinity; | ||
| 608 | + var h = 0.0; | ||
| 609 | + for (var child in row.children) { | ||
| 610 | + y = math.min(y, child.box!.y); | ||
| 611 | + h = math.max(h, child.box!.height); | ||
| 612 | + } | ||
| 608 | row.decoration!.paint( | 613 | row.decoration!.paint( |
| 609 | context, | 614 | context, |
| 610 | - PdfRect(0, child.box!.y, box!.width, child.box!.height), | 615 | + PdfRect(0, y, box!.width, h), |
| 611 | PaintPhase.background, | 616 | PaintPhase.background, |
| 612 | ); | 617 | ); |
| 613 | } | 618 | } |
| @@ -632,11 +637,16 @@ class Table extends Widget implements SpanningWidget { | @@ -632,11 +637,16 @@ class Table extends Widget implements SpanningWidget { | ||
| 632 | continue; | 637 | continue; |
| 633 | } | 638 | } |
| 634 | 639 | ||
| 635 | - final child = row.children.first; | ||
| 636 | if (row.decoration != null) { | 640 | if (row.decoration != null) { |
| 641 | + var y = double.infinity; | ||
| 642 | + var h = 0.0; | ||
| 643 | + for (var child in row.children) { | ||
| 644 | + y = math.min(y, child.box!.y); | ||
| 645 | + h = math.max(h, child.box!.height); | ||
| 646 | + } | ||
| 637 | row.decoration!.paint( | 647 | row.decoration!.paint( |
| 638 | context, | 648 | context, |
| 639 | - PdfRect(0, child.box!.y, box!.width, child.box!.height), | 649 | + PdfRect(0, y, box!.width, h), |
| 640 | PaintPhase.foreground, | 650 | PaintPhase.foreground, |
| 641 | ); | 651 | ); |
| 642 | } | 652 | } |
-
Please register or login to post a comment