From ae8d6f6cf2d75082e54efef3a0538fff9c0b1230 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Sat, 30 Apr 2022 15:32:24 +0100 Subject: [PATCH] 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. --- apps/game/src/edit/roads.rs | 10 +++++----- apps/game/src/ungap/predict.rs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/game/src/edit/roads.rs b/apps/game/src/edit/roads.rs index aa0a8a68f9..6fe174a9d4 100644 --- a/apps/game/src/edit/roads.rs +++ b/apps/game/src/edit/roads.rs @@ -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, }) }), ), diff --git a/apps/game/src/ungap/predict.rs b/apps/game/src/ungap/predict.rs index 531bd8bae0..0380337365 100644 --- a/apps/game/src/ungap/predict.rs +++ b/apps/game/src/ungap/predict.rs @@ -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, }) }), ),