diff --git a/crates/egui/src/widgets/progress_bar.rs b/crates/egui/src/widgets/progress_bar.rs index 0c93e1e1827..6bc746da7c5 100644 --- a/crates/egui/src/widgets/progress_bar.rs +++ b/crates/egui/src/widgets/progress_bar.rs @@ -117,10 +117,7 @@ impl Widget for ProgressBar { let rounding = rounding.unwrap_or_else(|| corner_radius.into()); ui.painter() .rect(outer_rect, rounding, visuals.extreme_bg_color, Stroke::NONE); - let min_width = rounding - .sw - .at_least(rounding.nw) - .at_most(2.0 * corner_radius); + let min_width = 2.0 * rounding.sw.at_least(rounding.nw).at_most(corner_radius); let filled_width = (outer_rect.width() * progress).at_least(min_width); let inner_rect = Rect::from_min_size(outer_rect.min, vec2(filled_width, outer_rect.height()));