summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-06-30 00:32:55 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-06-30 01:02:26 +0200
commitcb530ccf2f0ba82e49be317a14eb61025777a24e (patch)
treeb3d0f2e3bc048be2fa7cef1ca2f15ad841d283b8 /native
parent1bc69e7a8a8ea59efc14fd765889895662c9ba46 (diff)
downloadiced-cb530ccf2f0ba82e49be317a14eb61025777a24e.tar.gz
iced-cb530ccf2f0ba82e49be317a14eb61025777a24e.tar.bz2
iced-cb530ccf2f0ba82e49be317a14eb61025777a24e.zip
Rename `regions` and `splits` in `pane_grid::Node`
Diffstat (limited to 'native')
-rw-r--r--native/src/widget/pane_grid.rs8
-rw-r--r--native/src/widget/pane_grid/node.rs4
-rw-r--r--native/src/widget/pane_grid/state.rs14
3 files changed, 14 insertions, 12 deletions
diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs
index 2d21a968..de59795c 100644
--- a/native/src/widget/pane_grid.rs
+++ b/native/src/widget/pane_grid.rs
@@ -288,7 +288,7 @@ impl<'a, Message, Renderer> PaneGrid<'a, Message, Renderer> {
if let Some((split, _)) = self.state.picked_split() {
let bounds = layout.bounds();
- let splits = self.state.splits(
+ let splits = self.state.split_regions(
f32::from(self.spacing),
Size::new(bounds.width, bounds.height),
);
@@ -410,7 +410,7 @@ where
let limits = limits.width(self.width).height(self.height);
let size = limits.resolve(Size::ZERO);
- let regions = self.state.regions(f32::from(self.spacing), size);
+ let regions = self.state.pane_regions(f32::from(self.spacing), size);
let children = self
.elements
@@ -453,7 +453,7 @@ where
cursor_position.y - bounds.y,
);
- let splits = self.state.splits(
+ let splits = self.state.split_regions(
f32::from(self.spacing),
Size::new(bounds.width, bounds.height),
);
@@ -590,7 +590,7 @@ where
let splits = self
.state
- .splits(f32::from(self.spacing), bounds.size());
+ .split_regions(f32::from(self.spacing), bounds.size());
hovered_split(
splits.iter(),
diff --git a/native/src/widget/pane_grid/node.rs b/native/src/widget/pane_grid/node.rs
index b13c5e26..823caab1 100644
--- a/native/src/widget/pane_grid/node.rs
+++ b/native/src/widget/pane_grid/node.rs
@@ -48,7 +48,7 @@ impl Node {
///
/// [`Pane`]: struct.Pane.html
/// [`Node`]: enum.Node.html
- pub fn regions(
+ pub fn pane_regions(
&self,
spacing: f32,
size: Size,
@@ -75,7 +75,7 @@ impl Node {
///
/// [`Split`]: struct.Split.html
/// [`Node`]: enum.Node.html
- pub fn splits(
+ pub fn split_regions(
&self,
spacing: f32,
size: Size,
diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs
index 4b13fb8e..57fdbc55 100644
--- a/native/src/widget/pane_grid/state.rs
+++ b/native/src/widget/pane_grid/state.rs
@@ -154,8 +154,10 @@ impl<T> State<T> {
/// [`Pane`]: struct.Pane.html
/// [`State::active`]: struct.State.html#method.active
pub fn adjacent(&self, pane: &Pane, direction: Direction) -> Option<Pane> {
- let regions =
- self.internal.layout.regions(0.0, Size::new(4096.0, 4096.0));
+ let regions = self
+ .internal
+ .layout
+ .pane_regions(0.0, Size::new(4096.0, 4096.0));
let current_region = regions.get(pane)?;
@@ -362,20 +364,20 @@ impl Internal {
}
}
- pub fn regions(
+ pub fn pane_regions(
&self,
spacing: f32,
size: Size,
) -> HashMap<Pane, Rectangle> {
- self.layout.regions(spacing, size)
+ self.layout.pane_regions(spacing, size)
}
- pub fn splits(
+ pub fn split_regions(
&self,
spacing: f32,
size: Size,
) -> HashMap<Split, (Axis, Rectangle, f32)> {
- self.layout.splits(spacing, size)
+ self.layout.split_regions(spacing, size)
}
pub fn focus(&mut self, pane: &Pane) {