From 39f7368d2e2179ea822674b4caabc9deb23e7c56 Mon Sep 17 00:00:00 2001 From: YgorSouza <43298013+YgorSouza@users.noreply.github.com> Date: Sun, 7 Jul 2024 08:50:04 +0200 Subject: [PATCH] Fix typos (#4796) --- crates/egui/src/context.rs | 2 +- crates/egui_demo_lib/src/demo/tooltips.rs | 4 ++-- crates/egui_plot/src/axis.rs | 4 ++-- crates/egui_plot/src/legend.rs | 2 +- crates/egui_plot/src/lib.rs | 2 +- crates/egui_plot/src/plot_ui.rs | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index f1722418..5ddadf78 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -776,7 +776,7 @@ impl Context { self.write(|ctx| ctx.begin_frame_mut(new_input)); - // Plugs run just after the frame has started: + // Plugins run just after the frame has started: self.read(|ctx| ctx.plugins.clone()).on_begin_frame(self); } } diff --git a/crates/egui_demo_lib/src/demo/tooltips.rs b/crates/egui_demo_lib/src/demo/tooltips.rs index 81aa8278..ede4bb9f 100644 --- a/crates/egui_demo_lib/src/demo/tooltips.rs +++ b/crates/egui_demo_lib/src/demo/tooltips.rs @@ -99,8 +99,8 @@ impl Tooltips { }); }; - ui.label("You can have different tooltips depending on whether or not a widget is enabled or not:") - .on_hover_text("Check the tooltip of the button below, and see how it changes dependning on whether or not it is enabled."); + ui.label("You can have different tooltips depending on whether or not a widget is enabled:") + .on_hover_text("Check the tooltip of the button below, and see how it changes depending on whether or not it is enabled."); ui.horizontal(|ui| { ui.checkbox(&mut self.enabled, "Enabled") diff --git a/crates/egui_plot/src/axis.rs b/crates/egui_plot/src/axis.rs index 244691f3..79925115 100644 --- a/crates/egui_plot/src/axis.rs +++ b/crates/egui_plot/src/axis.rs @@ -115,7 +115,7 @@ impl<'a> AxisHints<'a> { Self::new(Axis::X) } - /// Initializes a default axis configuration for the X axis. + /// Initializes a default axis configuration for the Y axis. pub fn new_y() -> Self { Self::new(Axis::Y) } @@ -232,7 +232,7 @@ pub(super) struct AxisWidget<'a> { } impl<'a> AxisWidget<'a> { - /// if `rect` as width or height == 0, is will be automatically calculated from ticks and text. + /// if `rect` has width or height == 0, it will be automatically calculated from ticks and text. pub fn new(hints: AxisHints<'a>, rect: Rect) -> Self { Self { range: (0.0..=0.0), diff --git a/crates/egui_plot/src/legend.rs b/crates/egui_plot/src/legend.rs index 903cdbb3..e7eb0793 100644 --- a/crates/egui_plot/src/legend.rs +++ b/crates/egui_plot/src/legend.rs @@ -186,7 +186,7 @@ impl LegendWidget { rect: Rect, config: Legend, items: &[Box], - hidden_items: &ahash::HashSet, // Existing hiddent items in the plot memory. + hidden_items: &ahash::HashSet, // Existing hidden items in the plot memory. ) -> Option { // If `config.hidden_items` is not `None`, it is used. let hidden_items = config.hidden_items.as_ref().unwrap_or(hidden_items); diff --git a/crates/egui_plot/src/lib.rs b/crates/egui_plot/src/lib.rs index aaec92df..aba67930 100644 --- a/crates/egui_plot/src/lib.rs +++ b/crates/egui_plot/src/lib.rs @@ -1359,7 +1359,7 @@ fn axis_widgets<'a>( plot_rect = complete_rect; } - // Bow that we know the final x_range of the plot_rect, + // Now that we know the final x_range of the plot_rect, // assign it to the x_axis_widgets (they are currently too wide): for widget in &mut x_axis_widgets { widget.rect = Rect::from_x_y_ranges(plot_rect.x_range(), widget.rect.y_range()); diff --git a/crates/egui_plot/src/plot_ui.rs b/crates/egui_plot/src/plot_ui.rs index c4a39a6d..83c4c367 100644 --- a/crates/egui_plot/src/plot_ui.rs +++ b/crates/egui_plot/src/plot_ui.rs @@ -61,7 +61,7 @@ impl PlotUi { &self.response } - /// Scale the plot bounds around a position in screen coordinates. + /// Scale the plot bounds around a position in plot coordinates. /// /// Can be useful for implementing alternative plot navigation methods. ///