mirror of
https://github.com/flutter/flutter
synced 2024-09-21 17:22:30 +00:00
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:
parent
337d6df73d
commit
c31706f996
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue