Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c4127ee6
Commit
c4127ee6
authored
Feb 18, 2017
by
Ian Hickson
Committed by
GitHub
Feb 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the transforms for horizontal glows. (#8252)
Also, make all painters have a toString by default.
parent
4a02afad
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
10 deletions
+12
-10
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+3
-0
overscroll_indicator.dart
packages/flutter/lib/src/widgets/overscroll_indicator.dart
+4
-5
overscroll_indicator_test.dart
packages/flutter/test/widgets/overscroll_indicator_test.dart
+5
-5
No files found.
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
c4127ee6
...
@@ -1777,6 +1777,9 @@ abstract class CustomPainter {
...
@@ -1777,6 +1777,9 @@ abstract class CustomPainter {
/// point that should be considered outside the painted image, and null to use
/// point that should be considered outside the painted image, and null to use
/// the default behavior.
/// the default behavior.
bool
hitTest
(
Point
position
)
=>
null
;
bool
hitTest
(
Point
position
)
=>
null
;
@override
String
toString
()
=>
'
$runtimeType
#
$hashCode
'
;
}
}
/// Provides a canvas on which to draw during the paint phase.
/// Provides a canvas on which to draw during the paint phase.
...
...
packages/flutter/lib/src/widgets/overscroll_indicator.dart
View file @
c4127ee6
...
@@ -450,16 +450,15 @@ class _GlowingOverscrollIndicatorPainter extends CustomPainter {
...
@@ -450,16 +450,15 @@ class _GlowingOverscrollIndicatorPainter extends CustomPainter {
break
;
break
;
case
AxisDirection
.
left
:
case
AxisDirection
.
left
:
canvas
.
save
();
canvas
.
save
();
canvas
.
translate
(
0.0
,
size
.
height
);
canvas
.
rotate
(
piOver2
);
canvas
.
rotate
(-
piOver2
);
canvas
.
scale
(
1.0
,
-
1.0
);
controller
.
paint
(
canvas
,
new
Size
(
size
.
height
,
size
.
width
));
controller
.
paint
(
canvas
,
new
Size
(
size
.
height
,
size
.
width
));
canvas
.
restore
();
canvas
.
restore
();
break
;
break
;
case
AxisDirection
.
right
:
case
AxisDirection
.
right
:
canvas
.
save
();
canvas
.
save
();
canvas
.
translate
(
size
.
width
,
size
.
height
);
canvas
.
translate
(
size
.
width
,
0.0
);
canvas
.
rotate
(-
piOver2
);
canvas
.
rotate
(
piOver2
);
canvas
.
scale
(
1.0
,
-
1.0
);
controller
.
paint
(
canvas
,
new
Size
(
size
.
height
,
size
.
width
));
controller
.
paint
(
canvas
,
new
Size
(
size
.
height
,
size
.
width
));
canvas
.
restore
();
canvas
.
restore
();
break
;
break
;
...
...
packages/flutter/test/widgets/overscroll_indicator_test.dart
View file @
c4127ee6
...
@@ -187,11 +187,11 @@ void main() {
...
@@ -187,11 +187,11 @@ void main() {
);
);
RenderObject
painter
=
tester
.
renderObject
(
find
.
byType
(
CustomPaint
));
RenderObject
painter
=
tester
.
renderObject
(
find
.
byType
(
CustomPaint
));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(
5.0
,
0.0
));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(
5.0
,
0.0
));
expect
(
painter
,
paints
..
rotate
(
angle:
-
math
.
PI
/
2.0
)..
circle
()..
scale
(
y:
-
1.0
));
expect
(
painter
,
paints
..
rotate
(
angle:
math
.
PI
/
2.0
)..
circle
()..
saveRestore
(
));
expect
(
painter
,
isNot
(
paints
..
circle
()..
circle
()));
expect
(
painter
,
isNot
(
paints
..
circle
()..
circle
()));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(-
5.0
,
0.0
));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(-
5.0
,
0.0
));
expect
(
painter
,
paints
..
rotate
(
angle:
-
math
.
PI
/
2.0
)..
circle
()
expect
(
painter
,
paints
..
rotate
(
angle:
math
.
PI
/
2.0
)..
circle
()
..
rotate
(
angle:
-
math
.
PI
/
2.0
)..
scale
(
y:
-
1
.0
)..
circle
());
..
rotate
(
angle:
math
.
PI
/
2
.0
)..
circle
());
await
tester
.
pumpUntilNoTransientCallbacks
(
const
Duration
(
seconds:
1
));
await
tester
.
pumpUntilNoTransientCallbacks
(
const
Duration
(
seconds:
1
));
expect
(
painter
,
doesNotOverscroll
);
expect
(
painter
,
doesNotOverscroll
);
...
@@ -237,7 +237,7 @@ void main() {
...
@@ -237,7 +237,7 @@ void main() {
);
);
painter
=
tester
.
renderObject
(
find
.
byType
(
CustomPaint
));
painter
=
tester
.
renderObject
(
find
.
byType
(
CustomPaint
));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(
5.0
,
0.0
));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(
5.0
,
0.0
));
expect
(
painter
,
paints
..
scale
(
y:
-
1.0
)..
rotate
(
angle:
-
math
.
PI
/
2.0
)..
circle
(
color:
const
Color
(
0x0A00FF00
)));
expect
(
painter
,
paints
..
rotate
(
angle:
math
.
PI
/
2.0
)..
circle
(
color:
const
Color
(
0x0A00FF00
)));
expect
(
painter
,
isNot
(
paints
..
circle
()..
circle
()));
expect
(
painter
,
isNot
(
paints
..
circle
()..
circle
()));
await
tester
.
pumpUntilNoTransientCallbacks
(
const
Duration
(
seconds:
1
));
await
tester
.
pumpUntilNoTransientCallbacks
(
const
Duration
(
seconds:
1
));
...
@@ -254,7 +254,7 @@ void main() {
...
@@ -254,7 +254,7 @@ void main() {
);
);
painter
=
tester
.
renderObject
(
find
.
byType
(
CustomPaint
));
painter
=
tester
.
renderObject
(
find
.
byType
(
CustomPaint
));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(
5.0
,
0.0
));
await
slowDrag
(
tester
,
const
Point
(
200.0
,
200.0
),
const
Offset
(
5.0
,
0.0
));
expect
(
painter
,
paints
..
rotate
(
angle:
-
math
.
PI
/
2.0
)..
circle
(
color:
const
Color
(
0x0A0000FF
))..
scale
(
y:
-
1.0
));
expect
(
painter
,
paints
..
rotate
(
angle:
math
.
PI
/
2.0
)..
circle
(
color:
const
Color
(
0x0A0000FF
))..
saveRestore
(
));
expect
(
painter
,
isNot
(
paints
..
circle
()..
circle
()));
expect
(
painter
,
isNot
(
paints
..
circle
()..
circle
()));
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment