David PHAM-VAN

Fix border painting with TableRow

@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 - Fix Checkbox Widget 5 - Fix Checkbox Widget
6 - Fix SVG colors with percent 6 - Fix SVG colors with percent
7 - Fix TextField Widget 7 - Fix TextField Widget
  8 +- Fix border painting with TableRow
8 9
9 ## 3.0.0-nullsafety.1 10 ## 3.0.0-nullsafety.1
10 11
@@ -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 }