From 78b0d0b24d8e0eb77fc35a1d836a1d9bc3a407c9 Mon Sep 17 00:00:00 2001 From: Justin Symonds Date: Tue, 12 Aug 2025 23:13:46 -0700 Subject: [PATCH 1/3] Fix trivial doc typos --- crates/egui/src/context.rs | 6 +++--- crates/egui/src/lib.rs | 2 +- crates/egui/src/memory/mod.rs | 2 +- crates/egui/src/ui.rs | 18 +++++++++--------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index aab81ab2c3f..f586744ba74 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -2834,7 +2834,7 @@ impl Context { self.input(|i| i.pointer.hover_pos()) } - /// If you detect a click or drag and wants to know where it happened, use this. + /// If you detect a click or drag and want to know where it happened, use this. /// /// Latest position of the mouse, but ignoring any [`crate::Event::PointerGone`] /// if there were interactions this pass. @@ -2907,7 +2907,7 @@ impl Context { /// Moves the given area to the top in its [`Order`]. /// - /// [`crate::Area`]:s and [`crate::Window`]:s also do this automatically when being clicked on or interacted with. + /// [`crate::Area`]s and [`crate::Window`]s also do this automatically when being clicked on or interacted with. pub fn move_to_top(&self, layer_id: LayerId) { self.memory_mut(|mem| mem.areas_mut().move_to_top(layer_id)); } @@ -3911,7 +3911,7 @@ impl Context { /// Show an immediate viewport, creating a new native window, if possible. /// /// This is the easier type of viewport to use, but it is less performant - /// at it requires both parent and child to repaint if any one of them needs repainting, + /// as it requires both parent and child to repaint if any one of them needs repainting, /// which effectively produce double work for two viewports, and triple work for three viewports, etc. /// To avoid this, use [`Self::show_viewport_deferred`] instead. /// diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index 960480b23c1..ca00aaec1e9 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -195,7 +195,7 @@ //! * lays out the letters `click me` in order to figure out the size of the button //! * decides where on screen to place the button //! * check if the mouse is hovering or clicking that location -//! * chose button colors based on if it is being hovered or clicked +//! * choose button colors based on if it is being hovered or clicked //! * add a [`Shape::Rect`] and [`Shape::Text`] to the list of shapes to be painted later this frame //! * return a [`Response`] with the [`clicked`](`Response::clicked`) member so the user can check for interactions //! diff --git a/crates/egui/src/memory/mod.rs b/crates/egui/src/memory/mod.rs index ddc5a9ffe36..844a4a0b1d9 100644 --- a/crates/egui/src/memory/mod.rs +++ b/crates/egui/src/memory/mod.rs @@ -21,7 +21,7 @@ pub use theme::{Theme, ThemePreference}; /// how far the user has scrolled in a [`ScrollArea`](crate::ScrollArea) etc. /// /// If you want this to persist when closing your app, you should serialize [`Memory`] and store it. -/// For this you need to enable the `persistence`. +/// For this you need to enable the `persistence` feature. /// /// If you want to store data for your widgets, you should look at [`Memory::data`] #[derive(Clone, Debug)] diff --git a/crates/egui/src/ui.rs b/crates/egui/src/ui.rs index d746b8fec8b..5ca54550255 100644 --- a/crates/egui/src/ui.rs +++ b/crates/egui/src/ui.rs @@ -74,14 +74,14 @@ pub struct Ui { /// This value is based on where in the hierarchy of widgets this Ui is in, /// and the value is increment with each added child widget. /// This works as an Id source only as long as new widgets aren't added or removed. - /// They are therefore only good for Id:s that has no state. + /// They are therefore only good for Id:s that have no state. next_auto_id_salt: u64, /// Specifies paint layer, clip rectangle and a reference to [`Context`]. painter: Painter, /// The [`Style`] (visuals, spacing, etc) of this ui. - /// Commonly many [`Ui`]:s share the same [`Style`]. + /// Commonly many [`Ui`]s share the same [`Style`]. /// The [`Ui`] implements copy-on-write for this. style: Arc