summaryrefslogtreecommitdiffstats
path: root/examples/the_matrix/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-07-12 21:40:46 +0200
committerLibravatar GitHub <noreply@github.com>2024-07-12 21:40:46 +0200
commit8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7 (patch)
tree826fa9e0acdf3a4e003f882c94ff24a4ac9f50e4 /examples/the_matrix/src
parentbe06060117da061ad8cad94ab0830c06def6b147 (diff)
parent3f480d3d18c41188bf40ead0a3dc4497316f11ae (diff)
downloadiced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.tar.gz
iced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.tar.bz2
iced-8cadd3b99485c344feb18b774c8e6fd6c1ea9dd7.zip
Merge pull request #2504 from iced-rs/view-ergonomics
Improved `view` ergonomics
Diffstat (limited to 'examples/the_matrix/src')
-rw-r--r--examples/the_matrix/src/main.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/the_matrix/src/main.rs b/examples/the_matrix/src/main.rs
index 2ae1cc3a..0ed52dda 100644
--- a/examples/the_matrix/src/main.rs
+++ b/examples/the_matrix/src/main.rs
@@ -2,8 +2,7 @@ use iced::mouse;
use iced::time::{self, Instant};
use iced::widget::canvas;
use iced::{
- Color, Element, Font, Length, Point, Rectangle, Renderer, Subscription,
- Theme,
+ Color, Element, Fill, Font, Point, Rectangle, Renderer, Subscription, Theme,
};
use std::cell::RefCell;
@@ -37,10 +36,7 @@ impl TheMatrix {
}
fn view(&self) -> Element<Message> {
- canvas(self as &Self)
- .width(Length::Fill)
- .height(Length::Fill)
- .into()
+ canvas(self as &Self).width(Fill).height(Fill).into()
}
fn subscription(&self) -> Subscription<Message> {