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()
|
final Path backgroundFillPath = Path()
|
||||||
..fillType = PathFillType.evenOdd
|
..fillType = PathFillType.evenOdd
|
||||||
..addRect(Rect.largest);
|
..addRect(Rect.fromLTWH(0.0, 0.0, size.width, size.height));
|
||||||
|
|
||||||
final Path pressedBackgroundFillPath = Path();
|
final Path pressedBackgroundFillPath = Path();
|
||||||
|
|
||||||
|
@ -1578,7 +1578,7 @@ class _RenderCupertinoDialogActions extends RenderBox
|
|||||||
// Create the button backgrounds path and paint it.
|
// Create the button backgrounds path and paint it.
|
||||||
final Path backgroundFillPath = Path()
|
final Path backgroundFillPath = Path()
|
||||||
..fillType = PathFillType.evenOdd
|
..fillType = PathFillType.evenOdd
|
||||||
..addRect(Rect.largest)
|
..addRect(Rect.fromLTWH(0.0, 0.0, size.width, size.height))
|
||||||
..addRect(verticalDivider);
|
..addRect(verticalDivider);
|
||||||
|
|
||||||
for (int i = 0; i < pressedButtonRects.length; i += 1) {
|
for (int i = 0; i < pressedButtonRects.length; i += 1) {
|
||||||
@ -1616,7 +1616,7 @@ class _RenderCupertinoDialogActions extends RenderBox
|
|||||||
|
|
||||||
final Path backgroundFillPath = Path()
|
final Path backgroundFillPath = Path()
|
||||||
..fillType = PathFillType.evenOdd
|
..fillType = PathFillType.evenOdd
|
||||||
..addRect(Rect.largest);
|
..addRect(Rect.fromLTWH(0.0, 0.0, size.width, size.height));
|
||||||
|
|
||||||
final Path pressedBackgroundFillPath = Path();
|
final Path pressedBackgroundFillPath = Path();
|
||||||
|
|
||||||
|
@ -678,14 +678,15 @@ void main() {
|
|||||||
// the dividers also paints a white background the size of Rect.largest.
|
// the dividers also paints a white background the size of Rect.largest.
|
||||||
// That background ends up being clipped by the containing ScrollView.
|
// 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
|
// 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
|
// 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.
|
// issue for our use-case, so we don't worry about it.
|
||||||
expect(actionsSectionBox, paints..path(
|
expect(actionsSectionBox, paints..path(
|
||||||
includes: <Offset>[
|
includes: <Offset>[
|
||||||
Offset(Rect.largest.left, Rect.largest.top),
|
const Offset(0.0, 0.0),
|
||||||
Offset(Rect.largest.right, Rect.largest.bottom),
|
Offset(actionsSectionBox.size.width, actionsSectionBox.size.height),
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user