summaryrefslogtreecommitdiffstats
path: root/lazy
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lazy/Cargo.toml4
-rw-r--r--lazy/src/component.rs9
-rw-r--r--lazy/src/lazy.rs7
-rw-r--r--lazy/src/responsive.rs9
4 files changed, 26 insertions, 3 deletions
diff --git a/lazy/Cargo.toml b/lazy/Cargo.toml
index 657da5ca..c739b312 100644
--- a/lazy/Cargo.toml
+++ b/lazy/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "iced_lazy"
-version = "0.4.0"
+version = "0.5.0"
authors = ["Héctor Ramón Jiménez <hector0193@gmail.com>"]
edition = "2021"
description = "Lazy widgets for Iced"
@@ -14,5 +14,5 @@ categories = ["gui"]
ouroboros = "0.13"
[dependencies.iced_native]
-version = "0.8"
+version = "0.9"
path = "../native"
diff --git a/lazy/src/component.rs b/lazy/src/component.rs
index 94263274..b23da9f7 100644
--- a/lazy/src/component.rs
+++ b/lazy/src/component.rs
@@ -311,6 +311,8 @@ where
}
self.with_element(|element| {
+ tree.diff_children(std::slice::from_ref(&element));
+
element.as_widget().operate(
&mut tree.children[0],
layout,
@@ -563,4 +565,11 @@ where
event_status
}
+
+ fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
+ self.with_overlay_maybe(|overlay| {
+ overlay.is_over(layout, cursor_position)
+ })
+ .unwrap_or_default()
+ }
}
diff --git a/lazy/src/lazy.rs b/lazy/src/lazy.rs
index 9795afa4..5e909a49 100644
--- a/lazy/src/lazy.rs
+++ b/lazy/src/lazy.rs
@@ -372,6 +372,13 @@ where
})
.unwrap_or(iced_native::event::Status::Ignored)
}
+
+ fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
+ self.with_overlay_maybe(|overlay| {
+ overlay.is_over(layout, cursor_position)
+ })
+ .unwrap_or_default()
+ }
}
impl<'a, Message, Renderer, Dependency, View>
diff --git a/lazy/src/responsive.rs b/lazy/src/responsive.rs
index e399e7b0..57c07de1 100644
--- a/lazy/src/responsive.rs
+++ b/lazy/src/responsive.rs
@@ -42,7 +42,7 @@ where
content: RefCell::new(Content {
size: Size::ZERO,
layout: layout::Node::new(Size::ZERO),
- element: Element::new(horizontal_space(Length::Units(0))),
+ element: Element::new(horizontal_space(0)),
}),
}
}
@@ -415,4 +415,11 @@ where
})
.unwrap_or(iced_native::event::Status::Ignored)
}
+
+ fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
+ self.with_overlay_maybe(|overlay| {
+ overlay.is_over(layout, cursor_position)
+ })
+ .unwrap_or_default()
+ }
}