Implement pure version of PaneGrid widget

This commit is contained in:
Héctor Ramón Jiménez 2022-03-10 19:25:57 +07:00
parent 9f27969d14
commit 6dd187ff08
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
13 changed files with 2107 additions and 417 deletions

View file

@ -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,