Changing the slider thumb size. (#16515)

The spec changed the size of the slider thumb, so this just effects that change.
This commit is contained in:
Greg Spencer 2018-04-12 10:22:41 -07:00 committed by GitHub
parent 337d6df73d
commit c31706f996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -562,7 +562,7 @@ class RoundSliderThumbShape extends SliderComponentShape {
/// Create a slider thumb that draws a circle.
const RoundSliderThumbShape();
static const double _thumbRadius = 6.0;
static const double _thumbRadius = 10.0;
static const double _disabledThumbRadius = 4.0;
@override

View file

@ -998,7 +998,7 @@ void main() {
..circle(x: 400.0, y: 16.0, radius: 1.0)
..circle(x: 591.5, y: 16.0, radius: 1.0)
..circle(x: 783.0, y: 16.0, radius: 1.0)
..circle(x: 16.0, y: 16.0, radius: 6.0),
..circle(x: 16.0, y: 16.0, radius: 10.0),
);
gesture = await tester.startGesture(center);
@ -1015,7 +1015,7 @@ void main() {
..circle(x: 400.0, y: 16.0, radius: 1.0)
..circle(x: 591.5, y: 16.0, radius: 1.0)
..circle(x: 783.0, y: 16.0, radius: 1.0)
..circle(x: 105.0625, y: 16.0, radius: 6.0),
..circle(x: 105.0625, y: 16.0, radius: 10.0),
);
// Reparenting in the middle of an animation should do nothing.
@ -1035,7 +1035,7 @@ void main() {
..circle(x: 400.0, y: 16.0, radius: 1.0)
..circle(x: 591.5, y: 16.0, radius: 1.0)
..circle(x: 783.0, y: 16.0, radius: 1.0)
..circle(x: 185.5457763671875, y: 16.0, radius: 6.0),
..circle(x: 185.5457763671875, y: 16.0, radius: 10.0),
);
// Wait for animations to finish.
await tester.pumpAndSettle();
@ -1048,7 +1048,7 @@ void main() {
..circle(x: 208.5, y: 16.0, radius: 1.0)
..circle(x: 591.5, y: 16.0, radius: 1.0)
..circle(x: 783.0, y: 16.0, radius: 1.0)
..circle(x: 400.0, y: 16.0, radius: 6.0),
..circle(x: 400.0, y: 16.0, radius: 10.0),
);
await gesture.up();
await tester.pumpAndSettle();
@ -1060,7 +1060,7 @@ void main() {
..circle(x: 208.5, y: 16.0, radius: 1.0)
..circle(x: 591.5, y: 16.0, radius: 1.0)
..circle(x: 783.0, y: 16.0, radius: 1.0)
..circle(x: 400.0, y: 16.0, radius: 6.0),
..circle(x: 400.0, y: 16.0, radius: 10.0),
);
}

View file

@ -198,7 +198,7 @@ void main() {
final RenderBox sliderBox = tester.firstRenderObject<RenderBox>(find.byType(Slider));
expect(sliderBox, paints..circle(color: sliderTheme.thumbColor, radius: 6.0));
expect(sliderBox, paints..circle(color: sliderTheme.thumbColor, radius: 10.0));
await tester.pumpWidget(buildApp(enabled: false));
await tester.pumpAndSettle(); // wait for disable animation
@ -213,7 +213,7 @@ void main() {
..circle(color: sliderTheme.activeTickMarkColor)
..circle(color: sliderTheme.inactiveTickMarkColor)
..circle(color: sliderTheme.inactiveTickMarkColor)
..circle(color: sliderTheme.thumbColor, radius: 6.0));
..circle(color: sliderTheme.thumbColor, radius: 10.0));
await tester.pumpWidget(buildApp(divisions: 3, enabled: false));
await tester.pumpAndSettle(); // wait for disable animation