diff --git a/src/delay_dialog.rs b/src/delay_dialog.rs index 152bdf1..5294f7d 100644 --- a/src/delay_dialog.rs +++ b/src/delay_dialog.rs @@ -1,5 +1,6 @@ use std::{thread, cell::RefCell}; use nwg::{ControlHandle, NativeUi, NumberSelectData}; +use crate::settings::{LOWEST_DELAY, MAX_DELAY}; pub enum DelayDialogData { Cancel, @@ -28,9 +29,9 @@ impl DelayDialog { let number_select_data = NumberSelectData::Int { value: (current_value / 1000) as i64, - step: 1, // 1 second - max: 1800, // 30 minutes - min: 1, // 1 second + step: 1, // 1 second steps + max: MAX_DELAY as i64, // 30 minutes + min: LOWEST_DELAY as i64, // 1 second }; app.number_select.set_data(number_select_data); diff --git a/src/distance_dialog.rs b/src/distance_dialog.rs index 9e29b61..dde2ee5 100644 --- a/src/distance_dialog.rs +++ b/src/distance_dialog.rs @@ -1,6 +1,7 @@ use crate::mover; use std::{thread, cell::RefCell}; use nwg::{ControlHandle, NativeUi, NumberSelectData}; +use crate::settings::LOWEST_MAX_DISTANCE; pub enum DistanceDialogData { Cancel, @@ -35,7 +36,7 @@ impl DistanceDialog { value: current_value_x as i64, step: 1, max: smallest_x as i64 / 4, - min: 1, + min: LOWEST_MAX_DISTANCE as i64, }; app.number_select_x.set_data(number_select_data_x); @@ -43,7 +44,7 @@ impl DistanceDialog { value: current_value_y as i64, step: 1, max: smallest_y as i64 / 4, - min: 1, + min: LOWEST_MAX_DISTANCE as i64, }; app.number_select_y.set_data(number_select_data_y);