summaryrefslogtreecommitdiffstats
path: root/widget/src/shader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src/shader.rs')
-rw-r--r--widget/src/shader.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/widget/src/shader.rs b/widget/src/shader.rs
index 8e334693..16b68c55 100644
--- a/widget/src/shader.rs
+++ b/widget/src/shader.rs
@@ -70,12 +70,11 @@ where
tree::State::new(P::State::default())
}
- fn width(&self) -> Length {
- self.width
- }
-
- fn height(&self) -> Length {
- self.height
+ fn size(&self) -> Size<Length> {
+ Size {
+ width: self.width,
+ height: self.height,
+ }
}
fn layout(
@@ -84,10 +83,7 @@ where
_renderer: &Renderer,
limits: &layout::Limits,
) -> layout::Node {
- let limits = limits.width(self.width).height(self.height);
- let size = limits.resolve(Size::ZERO);
-
- layout::Node::new(size)
+ layout::atomic(limits, self.width, self.height)
}
fn on_event(