WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 3fcdab4

Browse files
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.
1 parent de90761 commit 3fcdab4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

crates/egui/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4057,7 +4057,7 @@ impl Context {
40574057
/// Is this specific widget being dragged?
40584058
///
40594059
/// A widget that sense both clicks and drags is only marked as "dragged"
4060-
/// when the mouse has moved a bit
4060+
/// when the mouse has moved a bit.
40614061
///
40624062
/// See also: [`crate::Response::dragged`].
40634063
pub fn is_being_dragged(&self, id: Id) -> bool {
@@ -4071,7 +4071,7 @@ impl Context {
40714071
self.interaction_snapshot(|i| i.drag_started)
40724072
}
40734073

4074-
/// This widget was being dragged, but was released this pass
4074+
/// This widget was being dragged, but was released this pass.
40754075
pub fn drag_stopped_id(&self) -> Option<Id> {
40764076
self.interaction_snapshot(|i| i.drag_stopped)
40774077
}

crates/egui/src/response.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ impl Response {
472472
///
473473
/// Only returns something if [`Self::contains_pointer`] is true,
474474
/// the user is drag-dropping something of this type,
475-
/// and they released it this frame
475+
/// and they released it this frame.
476476
#[doc(alias = "drag and drop")]
477477
pub fn dnd_release_payload<Payload: Any + Send + Sync>(&self) -> Option<Arc<Payload>> {
478478
// NOTE: we use `response.contains_pointer` here instead of `hovered`, because

crates/egui/src/ui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3004,7 +3004,7 @@ impl Ui {
30043004
///
30053005
/// Returns the dropped item, if it was released this frame.
30063006
///
3007-
/// The given frame is used for its margins, but it color is ignored.
3007+
/// The given frame is used for its margins, but the color is ignored.
30083008
#[doc(alias = "drag and drop")]
30093009
pub fn dnd_drop_zone<Payload, R>(
30103010
&mut self,

0 commit comments

Comments
 (0)