diff options
author | 2022-03-23 17:11:14 +0700 | |
---|---|---|
committer | 2022-03-23 17:11:14 +0700 | |
commit | 0eef527fa5b04be74141c75b076677473320e321 (patch) | |
tree | 5062a9ce2c370632de87a01471526da1176e0a60 /native/src/widget/pane_grid/axis.rs | |
parent | 4aece6b77617f4a37af8208d8ddb1618bf9052d3 (diff) | |
parent | ef4c79ea23e86fec9a8ad0fb27463296c14400e5 (diff) | |
download | iced-0eef527fa5b04be74141c75b076677473320e321.tar.gz iced-0eef527fa5b04be74141c75b076677473320e321.tar.bz2 iced-0eef527fa5b04be74141c75b076677473320e321.zip |
Merge pull request #1284 from iced-rs/virtual-widgets
Stateless widgets
Diffstat (limited to 'native/src/widget/pane_grid/axis.rs')
-rw-r--r-- | native/src/widget/pane_grid/axis.rs | 7 |
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, |