summaryrefslogtreecommitdiff
path: root/src/layout/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/mod.rs')
-rw-r--r--src/layout/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index b0fba4f2..a5dfa0ad 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -149,10 +149,7 @@ pub struct LayoutSpace {
impl LayoutSpace {
/// The actually usable area (dimensions minus padding).
pub fn usable(&self) -> Size2D {
- Size2D {
- x: self.dimensions.x - self.padding.left - self.padding.right,
- y: self.dimensions.y - self.padding.top - self.padding.bottom,
- }
+ self.dimensions.unpadded(self.padding)
}
}
@@ -161,6 +158,7 @@ impl LayoutSpace {
pub enum Alignment {
Left,
Right,
+ Center,
}
/// The error type for layouting.