summaryrefslogtreecommitdiff
path: root/src/layout/nodes/stack.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-10-07 18:24:47 +0200
committerLaurenz <laurmaedje@gmail.com>2020-10-07 18:24:47 +0200
commitd2e220245d9c17a0ac8c3474984924f65ed6b835 (patch)
tree003ae20f6bc1c13c5f202d0e7beb3c9fff6b09b7 /src/layout/nodes/stack.rs
parent537545e7f8351d7677c396456e46568f5a5e2a7a (diff)
Move deco, pass and feedback into diagnostics module ↩
Diffstat (limited to 'src/layout/nodes/stack.rs')
-rw-r--r--src/layout/nodes/stack.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/layout/nodes/stack.rs b/src/layout/nodes/stack.rs
index 983175b8..343f4461 100644
--- a/src/layout/nodes/stack.rs
+++ b/src/layout/nodes/stack.rs
@@ -1,5 +1,4 @@
use super::*;
-use crate::geom::Linear;
/// A node that stacks and aligns its children.
///
@@ -158,21 +157,6 @@ impl StackLayouter {
*self.space.usable.get_mut(self.ctx.dirs.main.axis()) -= added.main;
}
- /// Update the layouting spaces.
- ///
- /// If `replace_empty` is true, the current space is replaced if there are
- /// no boxes laid out into it yet. Otherwise, the followup spaces are
- /// replaced.
- pub fn set_spaces(&mut self, spaces: Vec<LayoutSpace>, replace_empty: bool) {
- if replace_empty && self.space_is_empty() {
- self.ctx.spaces = spaces;
- self.start_space(0, self.space.hard);
- } else {
- self.ctx.spaces.truncate(self.space.index + 1);
- self.ctx.spaces.extend(spaces);
- }
- }
-
/// Move to the first space that can fit the given size or do nothing
/// if no space is capable of that.
pub fn skip_to_fitting_space(&mut self, size: Size) {
@@ -208,11 +192,6 @@ impl StackLayouter {
self.space.used == Size::ZERO && self.space.layouts.is_empty()
}
- /// Whether the current layout space is the last in the followup list.
- pub fn space_is_last(&self) -> bool {
- self.space.index == self.ctx.spaces.len() - 1
- }
-
/// Finish everything up and return the final collection of boxes.
pub fn finish(mut self) -> Vec<BoxLayout> {
if self.space.hard || !self.space_is_empty() {