From 1b3c235c4c415715169d8c135871271022ffdd18 Mon Sep 17 00:00:00 2001 From: Ygor Souza Date: Sat, 12 Aug 2023 18:24:18 +0200 Subject: [PATCH] Clarify how the animate() and rounding() methods interact --- crates/egui/src/widgets/progress_bar.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/widgets/progress_bar.rs b/crates/egui/src/widgets/progress_bar.rs index de359a04f2c..bf476dd11ee 100644 --- a/crates/egui/src/widgets/progress_bar.rs +++ b/crates/egui/src/widgets/progress_bar.rs @@ -58,14 +58,20 @@ impl ProgressBar { /// Whether to display a loading animation when progress `< 1`. /// Note that this will cause the UI to be redrawn. /// Defaults to `false`. + /// + /// If [`Self::rounding`] and [`Self::animate`] are used simultaneously, the animation is not + /// rendered, since it requires a perfect circle to render correctly. However, the UI is still + /// redrawn. pub fn animate(mut self, animate: bool) -> Self { self.animate = animate; self } /// Set the rounding of the progress bar. - /// If this option is set, the [`Self::animate`] option is ignored, since the loading animation - /// requires a perfect circle to render correctly. + /// + /// If [`Self::rounding`] and [`Self::animate`] are used simultaneously, the animation is not + /// rendered, since it requires a perfect circle to render correctly. However, the UI is still + /// redrawn. pub fn rounding(mut self, rounding: impl Into) -> Self { self.rounding = Some(rounding.into()); self