From dc4b24f91357bbad7e502909f59195ee01ea066d Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 5 Dec 2025 02:44:06 -0700 Subject: [PATCH] Typo fix in drag-and-drop documentation (#7750) * [x] I have followed the instructions in the PR template Adding periods to the end of sentences and fixes a grammar mistake on documentation for the drag-and-drop code to become consistent with the rest of the documentation. The documentation for `Ui::dnd_drop_zone` could've used the word "its" instead of "the" to replace "it", but I think "the" more clearly refers to the `Frame` since "its" has been used to refer to the drop-zone already. --- crates/egui/src/context.rs | 4 ++-- crates/egui/src/response.rs | 2 +- crates/egui/src/ui.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/egui/src/context.rs b/crates/egui/src/context.rs index 5a868dd75..a887b5088 100644 --- a/crates/egui/src/context.rs +++ b/crates/egui/src/context.rs @@ -4016,7 +4016,7 @@ impl Context { /// Is this specific widget being dragged? /// /// A widget that sense both clicks and drags is only marked as "dragged" - /// when the mouse has moved a bit + /// when the mouse has moved a bit. /// /// See also: [`crate::Response::dragged`]. pub fn is_being_dragged(&self, id: Id) -> bool { @@ -4030,7 +4030,7 @@ impl Context { self.interaction_snapshot(|i| i.drag_started) } - /// This widget was being dragged, but was released this pass + /// This widget was being dragged, but was released this pass. pub fn drag_stopped_id(&self) -> Option { self.interaction_snapshot(|i| i.drag_stopped) } diff --git a/crates/egui/src/response.rs b/crates/egui/src/response.rs index 4e75142cd..6aebcd4c9 100644 --- a/crates/egui/src/response.rs +++ b/crates/egui/src/response.rs @@ -472,7 +472,7 @@ impl Response { /// /// Only returns something if [`Self::contains_pointer`] is true, /// the user is drag-dropping something of this type, - /// and they released it this frame + /// and they released it this frame. #[doc(alias = "drag and drop")] pub fn dnd_release_payload(&self) -> Option> { // NOTE: we use `response.contains_pointer` here instead of `hovered`, because diff --git a/crates/egui/src/ui.rs b/crates/egui/src/ui.rs index d746b8fec..a7e840f3f 100644 --- a/crates/egui/src/ui.rs +++ b/crates/egui/src/ui.rs @@ -3011,7 +3011,7 @@ impl Ui { /// /// Returns the dropped item, if it was released this frame. /// - /// The given frame is used for its margins, but it color is ignored. + /// The given frame is used for its margins, but the color is ignored. #[doc(alias = "drag and drop")] pub fn dnd_drop_zone( &mut self,