From 82c2aa6bfd1ed90b32b303a900e13b2c07bc69ba Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 27 Oct 2019 02:59:25 +0100 Subject: Align items properly inside a `Scrollable` --- core/src/widget/scrollable.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core') diff --git a/core/src/widget/scrollable.rs b/core/src/widget/scrollable.rs index ef3bc1db..1bad8555 100644 --- a/core/src/widget/scrollable.rs +++ b/core/src/widget/scrollable.rs @@ -6,7 +6,6 @@ pub struct Scrollable<'a, Element> { pub height: Length, pub max_height: Length, pub align_self: Option, - pub align_items: Align, pub content: Column, } @@ -17,7 +16,6 @@ impl<'a, Element> Scrollable<'a, Element> { height: Length::Shrink, max_height: Length::Shrink, align_self: None, - align_items: Align::Start, content: Column::new(), } } @@ -87,7 +85,7 @@ impl<'a, Element> Scrollable<'a, Element> { /// /// [`Scrollable`]: struct.Scrollable.html pub fn align_items(mut self, align_items: Align) -> Self { - self.align_items = align_items; + self.content = self.content.align_items(align_items); self } -- cgit