summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-02-12 01:21:39 +0100
committerLibravatar GitHub <noreply@github.com>2020-02-12 01:21:39 +0100
commitf79b94111fcc8efef2226456b51778e9ee697d53 (patch)
tree471a79749986028a0030b3b4ff0479f88efd2f55
parent3a00f3398cf2b04fc08454b15f5b7dbc4272f259 (diff)
parent36c3160c398c9ba88e407d1f7254f399fd2e44bf (diff)
downloadiced-f79b94111fcc8efef2226456b51778e9ee697d53.tar.gz
iced-f79b94111fcc8efef2226456b51778e9ee697d53.tar.bz2
iced-f79b94111fcc8efef2226456b51778e9ee697d53.zip
Merge pull request #186 from Louis-Simon22/master
Container support for Align::End
-rw-r--r--native/src/widget/container.rs16
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`].
///