fix: cuertino dialog action background blur effect (#25076)
This commit is contained in:
parent
ef276ffea5
commit
13a30c0ce1
@ -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),
|
||||
],
|
||||
));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user