summaryrefslogtreecommitdiff
path: root/src/layout/stack.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-02-03 12:22:02 +0100
committerLaurenz <laurmaedje@gmail.com>2020-02-03 12:22:02 +0100
commit3150fd56437ecf8b2a5902c18e3f9ace800b768c (patch)
treedb8a7e9fc868145804db97da81bd0669aaf55454 /src/layout/stack.rs
parent40ea35cbe7482ce04096c4d63a848c8601cc1848 (diff)
Better Debug/Display and Derives 🧽
Diffstat (limited to 'src/layout/stack.rs')
-rw-r--r--src/layout/stack.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/stack.rs b/src/layout/stack.rs
index 8f76ccbf..891815e9 100644
--- a/src/layout/stack.rs
+++ b/src/layout/stack.rs
@@ -27,7 +27,7 @@ use super::*;
/// Performs the stack layouting.
-#[derive(Debug, Clone)]
+#[derive(Debug)]
pub struct StackLayouter {
/// The context for layouting.
ctx: StackContext,
@@ -57,7 +57,7 @@ pub struct StackContext {
/// A layout space composed of subspaces which can have different axes and
/// alignments.
-#[derive(Debug, Clone)]
+#[derive(Debug)]
struct Space {
/// The index of this space in the list of spaces.
index: usize,
@@ -134,7 +134,7 @@ impl StackLayouter {
// A hard space is simply an empty box.
SpacingKind::Hard => {
// Reduce the spacing such that it definitely fits.
- spacing.min_eq(self.space.usable.get_secondary(self.ctx.axes));
+ spacing.min_eq(self.space.usable.secondary(self.ctx.axes));
let dimensions = Size2D::with_y(spacing);
self.update_metrics(dimensions);
@@ -179,7 +179,7 @@ impl StackLayouter {
self.space.size = size.specialized(axes);
self.space.extra = extra.specialized(axes);
- *self.space.usable.get_secondary_mut(axes) -= dimensions.y;
+ *self.space.usable.secondary_mut(axes) -= dimensions.y;
}
/// Update the rulers to account for the new layout. Returns true if a
@@ -328,7 +328,7 @@ impl StackLayouter {
// the usable space for following layouts at it's origin by its
// extent along the secondary axis.
*bound.get_mut(axes.secondary, Origin)
- += axes.secondary.factor() * layout.dimensions.get_secondary(*axes);
+ += axes.secondary.factor() * layout.dimensions.secondary(*axes);
}
// ------------------------------------------------------------------ //