fix active_progress_width formula
change : let active_progress_width = bounds.width * ((value - range_start) / (range_end - range_start).max(1.0)) to : let active_progress_width = bounds.width * ((value - range_start) / (range_end - range_start).max(f32::EPSILON)).max(0.0).min(1.0)
This commit is contained in:
parent
1f7e8b7f3d
commit
9991a89428
|
@ -34,7 +34,7 @@ where
|
|||
|
||||
let (range_start, range_end) = range.into_inner();
|
||||
let active_progress_width = bounds.width
|
||||
* ((value - range_start) / (range_end - range_start).max(1.0));
|
||||
* ((value - range_start) / (range_end - range_start).max(f32::EPSILON)).max(0.0).min(1.0);
|
||||
|
||||
let background = Primitive::Group {
|
||||
primitives: vec![Primitive::Quad {
|
||||
|
|
Loading…
Reference in New Issue