summaryrefslogtreecommitdiffstats
path: root/native/src/widget/container.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-15 00:50:36 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-15 00:50:36 +0100
commit4969bfdb66cf2b33033cb642423bc326e288e15b (patch)
tree030a56e38af9af6704f1f02ff52997f34e126959 /native/src/widget/container.rs
parentf5c80a6d75d5022b175d3562f0965598b6398bd7 (diff)
parentcf53026b51df390d98d37f93259b7b7b0a25c6f8 (diff)
downloadiced-4969bfdb66cf2b33033cb642423bc326e288e15b.tar.gz
iced-4969bfdb66cf2b33033cb642423bc326e288e15b.tar.bz2
iced-4969bfdb66cf2b33033cb642423bc326e288e15b.zip
Merge branch 'master' into feature/canvas
Diffstat (limited to 'native/src/widget/container.rs')
-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`].
///