mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-23 17:07:12 +03:00
Spinner widgets for distances are weird, because the step size probably shouldn't depend on the user's metric/imperial setting. Just flip the prior hack and always use meters for the spinners. Sorry not sorry USA users.
This commit is contained in:
parent
aff8d8ceef
commit
ae8d6f6cf2
@ -821,15 +821,15 @@ fn make_main_panel(
|
||||
Spinner::widget_with_custom_rendering(
|
||||
ctx,
|
||||
"width custom",
|
||||
(Distance::feet(1.0), Distance::feet(20.0)),
|
||||
(Distance::meters(0.3), Distance::meters(7.0)),
|
||||
lane.width,
|
||||
Distance::feet(0.5),
|
||||
// Even if the user's settings are set to meters, our step size is in feet, so
|
||||
// just render in feet.
|
||||
Distance::meters(0.1),
|
||||
// Even if the user's settings are set to feet, our step size is in meters, so
|
||||
// just render in meters.
|
||||
Box::new(|x| {
|
||||
x.to_string(&UnitFmt {
|
||||
round_durations: false,
|
||||
metric: false,
|
||||
metric: true,
|
||||
})
|
||||
}),
|
||||
),
|
||||
|
@ -277,15 +277,15 @@ impl Filters {
|
||||
Spinner::widget_with_custom_rendering(
|
||||
ctx,
|
||||
"max_elevation_gain",
|
||||
(Distance::ZERO, Distance::feet(500.0)),
|
||||
(Distance::ZERO, Distance::meters(500.0)),
|
||||
self.max_elevation_gain,
|
||||
Distance::feet(10.0),
|
||||
// Even if the user's settings are set to meters, our step size is in feet, so
|
||||
// just render in feet.
|
||||
Distance::meters(1.0),
|
||||
// Even if the user's settings are set to feet, our step size is in meters, so
|
||||
// just render in meters.
|
||||
Box::new(|x| {
|
||||
x.to_string(&UnitFmt {
|
||||
round_durations: false,
|
||||
metric: false,
|
||||
metric: true,
|
||||
})
|
||||
}),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user