From d4d14b68f47e9527554a728ebbba9b840832626a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 11 Nov 2019 05:37:51 +0100 Subject: Remove `padding` from `Container` for now --- examples/scroll.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'examples/scroll.rs') diff --git a/examples/scroll.rs b/examples/scroll.rs index 5a725f0c..98206268 100644 --- a/examples/scroll.rs +++ b/examples/scroll.rs @@ -1,6 +1,6 @@ use iced::{ - button, scrollable, Align, Application, Button, Column, Element, Image, - Justify, Length, Scrollable, Text, + button, scrollable, Align, Application, Button, Column, Container, Element, + Image, Length, Scrollable, Text, }; pub fn main() { @@ -65,11 +65,10 @@ impl Application for Example { .border_radius(5), ); - Column::new() + Container::new(content) + .width(Length::Fill) .height(Length::Fill) - .justify_content(Justify::Center) - .padding(20) - .push(content) + .center_y() .into() } } -- cgit From 860a6923bbed57a21ce4b2cae331f6a3a51ca3fe Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 11 Nov 2019 06:07:31 +0100 Subject: Split text measurements cache from rendering cache This speeds up layouting in the most common scenario considerably! :tada: --- examples/scroll.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/scroll.rs') diff --git a/examples/scroll.rs b/examples/scroll.rs index 98206268..50701879 100644 --- a/examples/scroll.rs +++ b/examples/scroll.rs @@ -1,6 +1,6 @@ use iced::{ - button, scrollable, Align, Application, Button, Column, Container, Element, - Image, Length, Scrollable, Text, + button, scrollable, Align, Application, Button, Container, Element, Image, + Length, Scrollable, Text, }; pub fn main() { -- cgit