Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 1586e1d

Browse files
committed
[Fix] Wrong Scroll Tolerance
1 parent 8ffa9f5 commit 1586e1d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Runtime/cupertino/localization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public override string datePickerMinuteSemanticsLabel(int minute) {
169169
public override string datePickerMediumDate(DateTime date) {
170170
var day = _shortWeekdays[((int) date.DayOfWeek + 6) % 7];
171171
var month = _shortMonths[date.Month - 1];
172-
return $"{day}, {month} {date.Day.ToString().PadRight(2)} ";
172+
return $"{day} {month} {date.Day.ToString().PadRight(2)} ";
173173
}
174174

175175
public override DatePickerDateOrder datePickerDateOrder {

Runtime/widgets/scroll_physics.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ public virtual SpringDescription spring {
7373
}
7474
}
7575

76-
// todo: Handle the case of the device pixel ratio changing. use 1 as devicePixelRatio for now.
7776
static readonly Tolerance _kDefaultTolerance = new Tolerance(
78-
velocity: 1.0f / (0.050f * 1),
79-
distance: 1.0f / 1
77+
velocity: 1.0f / (0.050f * Window.instance.devicePixelRatio),
78+
distance: 1.0f / Window.instance.devicePixelRatio
8079
);
8180

8281
public virtual Tolerance tolerance {

0 commit comments

Comments
 (0)