diff options
author | 2020-03-14 06:32:56 +0100 | |
---|---|---|
committer | 2020-03-14 06:32:56 +0100 | |
commit | a79603e4ca5e0cee46a737ef0b1af5c69ddb49b6 (patch) | |
tree | 30c794fe0f767dafe710034bd57402f98f3e74d5 /native/src/widget/pane_grid/state.rs | |
parent | 00c2b55b569ea2ff2fc9de9bbf02475c6ede7e42 (diff) | |
download | iced-a79603e4ca5e0cee46a737ef0b1af5c69ddb49b6.tar.gz iced-a79603e4ca5e0cee46a737ef0b1af5c69ddb49b6.tar.bz2 iced-a79603e4ca5e0cee46a737ef0b1af5c69ddb49b6.zip |
Rename `Split` to `Axis`
Diffstat (limited to 'native/src/widget/pane_grid/state.rs')
-rw-r--r-- | native/src/widget/pane_grid/state.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs index 61576a29..dc66e32a 100644 --- a/native/src/widget/pane_grid/state.rs +++ b/native/src/widget/pane_grid/state.rs @@ -1,6 +1,6 @@ use crate::{ input::keyboard, - pane_grid::{node::Node, Direction, Pane, Split}, + pane_grid::{node::Node, Axis, Direction, Pane}, Hasher, Point, Rectangle, Size, }; @@ -99,7 +99,7 @@ impl<T> State<T> { } pub fn split_vertically(&mut self, pane: &Pane, state: T) -> Option<Pane> { - self.split(Split::Vertical, pane, state) + self.split(Axis::Vertical, pane, state) } pub fn split_horizontally( @@ -107,15 +107,10 @@ impl<T> State<T> { pane: &Pane, state: T, ) -> Option<Pane> { - self.split(Split::Horizontal, pane, state) + self.split(Axis::Horizontal, pane, state) } - pub fn split( - &mut self, - kind: Split, - pane: &Pane, - state: T, - ) -> Option<Pane> { + pub fn split(&mut self, axis: Axis, pane: &Pane, state: T) -> Option<Pane> { let node = self.internal.layout.find(pane)?; let new_pane = { @@ -130,7 +125,7 @@ impl<T> State<T> { self.internal.last_id }; - node.split(split_id, kind, new_pane); + node.split(split_id, axis, new_pane); let _ = self.panes.insert(new_pane, state); self.focus(&new_pane); |