diff options
| author | 2020-02-11 18:09:20 -0500 | |
|---|---|---|
| committer | 2020-02-11 18:12:38 -0500 | |
| commit | 36c3160c398c9ba88e407d1f7254f399fd2e44bf (patch) | |
| tree | 471a79749986028a0030b3b4ff0479f88efd2f55 /native/src | |
| parent | 3a00f3398cf2b04fc08454b15f5b7dbc4272f259 (diff) | |
| download | iced-36c3160c398c9ba88e407d1f7254f399fd2e44bf.tar.gz iced-36c3160c398c9ba88e407d1f7254f399fd2e44bf.tar.bz2 iced-36c3160c398c9ba88e407d1f7254f399fd2e44bf.zip | |
Container support for Align::End
Diffstat (limited to '')
| -rw-r--r-- | native/src/widget/container.rs | 16 | 
1 files changed, 16 insertions, 0 deletions
| diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs index 5682fc87..3459a832 100644 --- a/native/src/widget/container.rs +++ b/native/src/widget/container.rs @@ -77,6 +77,22 @@ where          self.max_height = max_height;          self      } +     +    /// Sets the content alignment for the horizontal axis of the [`Container`]. +    /// +    /// [`Container`]: struct.Container.html +    pub fn align_x(mut self, alignment: Align) -> Self { +        self.horizontal_alignment = alignment; +        self +    } + +    /// Sets the content alignment for the vertical axis of the [`Container`]. +    /// +    /// [`Container`]: struct.Container.html +    pub fn align_y(mut self, alignment: Align) -> Self { +        self.vertical_alignment = alignment; +        self +    }      /// Centers the contents in the horizontal axis of the [`Container`].      /// | 
