Fix some minor documentation inconsistencies
This commit is contained in:
parent
be860508a9
commit
01c484245b
3 changed files with 8 additions and 5 deletions
|
|
@ -90,7 +90,10 @@ where
|
|||
mouse::Interaction::Idle
|
||||
}
|
||||
|
||||
/// Returns true if the cursor is over the [`Overlay`]
|
||||
/// Returns true if the cursor is over the [`Overlay`].
|
||||
///
|
||||
/// By default, it returns true if the bounds of the `layout` contain
|
||||
/// the `cursor_position`.
|
||||
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
|
||||
layout.bounds().contains(cursor_position)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ where
|
|||
self.overlay.operate(layout, renderer, operation);
|
||||
}
|
||||
|
||||
/// Returns true if the cursor is over the [`Element`]
|
||||
/// Returns true if the cursor is over the [`Element`].
|
||||
pub fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
|
||||
self.overlay.is_over(layout, cursor_position)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ use crate::renderer;
|
|||
use crate::widget;
|
||||
use crate::{Clipboard, Event, Layout, Overlay, Shell};
|
||||
|
||||
/// An [`Overlay`] container that displays multiple overlay
|
||||
/// [`overlay::Element`] children
|
||||
/// An [`Overlay`] container that displays multiple overlay [`overlay::Element`]
|
||||
/// children.
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub struct Group<'a, Message, Renderer> {
|
||||
children: Vec<overlay::Element<'a, Message, Renderer>>,
|
||||
|
|
@ -41,7 +41,7 @@ where
|
|||
self
|
||||
}
|
||||
|
||||
/// Turns the [`Group`] into an overlay [`overlay::Element`]
|
||||
/// Turns the [`Group`] into an overlay [`overlay::Element`].
|
||||
pub fn overlay(self) -> overlay::Element<'a, Message, Renderer> {
|
||||
overlay::Element::new(Point::ORIGIN, Box::new(self))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue