summaryrefslogtreecommitdiffstats
path: root/examples/scroll.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2019-11-14 06:46:50 +0100
committerLibravatar GitHub <noreply@github.com>2019-11-14 06:46:50 +0100
commitbc8d347736ec997ec0e0c401289e2bc09e212b8a (patch)
treeb98798c09a3aa914b7d0869fba0cfd3efff7754f /examples/scroll.rs
parent839e039dbf2fb89dcb8c141503740777d2af2eb3 (diff)
parent73f3c900071f950ea914652ca3f0002c1e173f61 (diff)
downloadiced-bc8d347736ec997ec0e0c401289e2bc09e212b8a.tar.gz
iced-bc8d347736ec997ec0e0c401289e2bc09e212b8a.tar.bz2
iced-bc8d347736ec997ec0e0c401289e2bc09e212b8a.zip
Merge pull request #52 from hecrj/custom-layout-engine
Custom layout engine
Diffstat (limited to 'examples/scroll.rs')
-rw-r--r--examples/scroll.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/scroll.rs b/examples/scroll.rs
index 5a725f0c..50701879 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, 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()
}
}