summaryrefslogtreecommitdiffstats
path: root/native/src/widget/pane_grid/axis.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-10 19:25:57 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-14 17:44:25 +0700
commit6dd187ff0822230f084e43636b1aabeb1baf06f6 (patch)
tree27426980b2882025a3c812ba2401d3bf8f6dca8d /native/src/widget/pane_grid/axis.rs
parent9f27969d14232355ad628431fb67aa07e42e768f (diff)
downloadiced-6dd187ff0822230f084e43636b1aabeb1baf06f6.tar.gz
iced-6dd187ff0822230f084e43636b1aabeb1baf06f6.tar.bz2
iced-6dd187ff0822230f084e43636b1aabeb1baf06f6.zip
Implement `pure` version of `PaneGrid` widget
Diffstat (limited to 'native/src/widget/pane_grid/axis.rs')
-rw-r--r--native/src/widget/pane_grid/axis.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/native/src/widget/pane_grid/axis.rs b/native/src/widget/pane_grid/axis.rs
index 2320cb7c..02bde064 100644
--- a/native/src/widget/pane_grid/axis.rs
+++ b/native/src/widget/pane_grid/axis.rs
@@ -10,7 +10,9 @@ pub enum Axis {
}
impl Axis {
- pub(super) fn split(
+ /// Splits the provided [`Rectangle`] on the current [`Axis`] with the
+ /// given `ratio` and `spacing`.
+ pub fn split(
&self,
rectangle: &Rectangle,
ratio: f32,
@@ -54,7 +56,8 @@ impl Axis {
}
}
- pub(super) fn split_line_bounds(
+ /// Calculates the bounds of the split line in a [`Rectangle`] region.
+ pub fn split_line_bounds(
&self,
rectangle: Rectangle,
ratio: f32,