1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

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.
This commit is contained in:
Ryan
2025-12-05 02:44:06 -07:00
committed by GitHub
parent de907612b7
commit 3fcdab4ebd
3 changed files with 4 additions and 4 deletions

View File

@@ -4057,7 +4057,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 {
@@ -4071,7 +4071,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<Id> {
self.interaction_snapshot(|i| i.drag_stopped)
}

View File

@@ -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<Payload: Any + Send + Sync>(&self) -> Option<Arc<Payload>> {
// NOTE: we use `response.contains_pointer` here instead of `hovered`, because

View File

@@ -3004,7 +3004,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<Payload, R>(
&mut self,