summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-11 05:37:51 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-11 05:37:51 +0100
commitd4d14b68f47e9527554a728ebbba9b840832626a (patch)
treec37dc77445e96d39b119aa1cadb46fa738743795 /native
parentceb02f4a36769c488c2525db2fb73f092a6c2706 (diff)
downloadiced-d4d14b68f47e9527554a728ebbba9b840832626a.tar.gz
iced-d4d14b68f47e9527554a728ebbba9b840832626a.tar.bz2
iced-d4d14b68f47e9527554a728ebbba9b840832626a.zip
Remove `padding` from `Container` for now
Diffstat (limited to 'native')
-rw-r--r--native/src/layout/node.rs8
-rw-r--r--native/src/widget/container.rs5
2 files changed, 7 insertions, 6 deletions
diff --git a/native/src/layout/node.rs b/native/src/layout/node.rs
index 9d8ad57d..64ebf2d0 100644
--- a/native/src/layout/node.rs
+++ b/native/src/layout/node.rs
@@ -46,7 +46,9 @@ impl Node {
Align::Center => {
self.bounds.x += (space.width - self.bounds.width) / 2.0;
}
- Align::End => {}
+ Align::End => {
+ self.bounds.x += space.width - self.bounds.width;
+ }
}
match vertical_alignment {
@@ -54,7 +56,9 @@ impl Node {
Align::Center => {
self.bounds.y += (space.height - self.bounds.height) / 2.0;
}
- Align::End => {}
+ Align::End => {
+ self.bounds.y += space.height - self.bounds.height;
+ }
}
}
}
diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs
index bb78a68c..c616db2a 100644
--- a/native/src/widget/container.rs
+++ b/native/src/widget/container.rs
@@ -1,8 +1,6 @@
use std::hash::Hash;
-use crate::{
- layout, Element, Event, Hasher, Layout, Length, Point, Size, Widget,
-};
+use crate::{layout, Element, Event, Hasher, Layout, Length, Point, Widget};
/// A container that distributes its contents vertically.
pub type Container<'a, Message, Renderer> =
@@ -73,7 +71,6 @@ where
self.height.hash(state);
self.max_width.hash(state);
self.max_height.hash(state);
- self.padding.hash(state);
self.content.hash_layout(state);
}