summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-04-25 23:19:39 +0200
committerLibravatar GitHub <noreply@github.com>2024-04-25 23:19:39 +0200
commit2d01d55cbc62601c640f2e55d8a8ddb5d63de1af (patch)
tree6a2a9339b2bc536fc71d3def15446b667110ca19 /core
parent5ef593ce53e0ba53d51809f198a02743f87a6ccd (diff)
parent4fc342c97963a7a7e7983604b9399fccf017aa53 (diff)
downloadiced-2d01d55cbc62601c640f2e55d8a8ddb5d63de1af.tar.gz
iced-2d01d55cbc62601c640f2e55d8a8ddb5d63de1af.tar.bz2
iced-2d01d55cbc62601c640f2e55d8a8ddb5d63de1af.zip
Merge pull request #2405 from iced-rs/feature/stack-widget
`Stack` widget
Diffstat (limited to 'core')
-rw-r--r--core/src/layout.rs2
-rw-r--r--core/src/mouse/interaction.rs1
-rw-r--r--core/src/overlay.rs2
-rw-r--r--core/src/widget.rs2
4 files changed, 4 insertions, 3 deletions
diff --git a/core/src/layout.rs b/core/src/layout.rs
index 95720aba..98d05602 100644
--- a/core/src/layout.rs
+++ b/core/src/layout.rs
@@ -54,7 +54,7 @@ impl<'a> Layout<'a> {
}
/// Returns an iterator over the [`Layout`] of the children of a [`Node`].
- pub fn children(self) -> impl Iterator<Item = Layout<'a>> {
+ pub fn children(self) -> impl DoubleEndedIterator<Item = Layout<'a>> {
self.node.children().iter().map(move |node| {
Layout::with_offset(
Vector::new(self.position.x, self.position.y),
diff --git a/core/src/mouse/interaction.rs b/core/src/mouse/interaction.rs
index 6ad66229..065eb8e7 100644
--- a/core/src/mouse/interaction.rs
+++ b/core/src/mouse/interaction.rs
@@ -3,6 +3,7 @@
#[allow(missing_docs)]
pub enum Interaction {
#[default]
+ None,
Idle,
Pointer,
Grab,
diff --git a/core/src/overlay.rs b/core/src/overlay.rs
index 03076a30..3a57fe16 100644
--- a/core/src/overlay.rs
+++ b/core/src/overlay.rs
@@ -79,7 +79,7 @@ where
_viewport: &Rectangle,
_renderer: &Renderer,
) -> mouse::Interaction {
- mouse::Interaction::Idle
+ mouse::Interaction::None
}
/// Returns true if the cursor is over the [`Overlay`].
diff --git a/core/src/widget.rs b/core/src/widget.rs
index 58a9f19b..b02e3a4f 100644
--- a/core/src/widget.rs
+++ b/core/src/widget.rs
@@ -137,7 +137,7 @@ where
_viewport: &Rectangle,
_renderer: &Renderer,
) -> mouse::Interaction {
- mouse::Interaction::Idle
+ mouse::Interaction::None
}
/// Returns the overlay of the [`Widget`], if there is any.