Commit 13a30c0c authored by akindone's avatar akindone Committed by xster

fix: cuertino dialog action background blur effect (#25076)

parent ef276ffe
......@@ -1185,7 +1185,7 @@ class _RenderCupertinoAlertActions extends RenderBox
final Path backgroundFillPath = Path()
..fillType = PathFillType.evenOdd
..addRect(Rect.largest);
..addRect(Rect.fromLTWH(0.0, 0.0, size.width, size.height));
final Path pressedBackgroundFillPath = Path();
......
......@@ -1578,7 +1578,7 @@ class _RenderCupertinoDialogActions extends RenderBox
// Create the button backgrounds path and paint it.
final Path backgroundFillPath = Path()
..fillType = PathFillType.evenOdd
..addRect(Rect.largest)
..addRect(Rect.fromLTWH(0.0, 0.0, size.width, size.height))
..addRect(verticalDivider);
for (int i = 0; i < pressedButtonRects.length; i += 1) {
......@@ -1616,7 +1616,7 @@ class _RenderCupertinoDialogActions extends RenderBox
final Path backgroundFillPath = Path()
..fillType = PathFillType.evenOdd
..addRect(Rect.largest);
..addRect(Rect.fromLTWH(0.0, 0.0, size.width, size.height));
final Path pressedBackgroundFillPath = Path();
......
......@@ -678,14 +678,15 @@ void main() {
// the dividers also paints a white background the size of Rect.largest.
// That background ends up being clipped by the containing ScrollView.
//
// Here we test that the largest Rect is contained within the painted Path.
// Here we test that the Rect(0.0, 0.0, renderBox.size.width, renderBox.size.height)
// is contained within the painted Path.
// We don't test for exclusion because for some reason the Path is reporting
// that even points beyond Rect.largest are within the Path. That's not an
// issue for our use-case, so we don't worry about it.
expect(actionsSectionBox, paints..path(
includes: <Offset>[
Offset(Rect.largest.left, Rect.largest.top),
Offset(Rect.largest.right, Rect.largest.bottom),
const Offset(0.0, 0.0),
Offset(actionsSectionBox.size.width, actionsSectionBox.size.height),
],
));
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment