diff options
-rw-r--r-- | native/src/widget/pane_grid.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index 7fc12176..3b68b99e 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -552,7 +552,7 @@ impl Split { ) -> (Rectangle, Rectangle) { match self { Split::Horizontal => { - let width_left = rectangle.width * ratio; + let width_left = (rectangle.width * ratio).round(); let width_right = rectangle.width - width_left; ( @@ -568,7 +568,7 @@ impl Split { ) } Split::Vertical => { - let height_top = rectangle.height * ratio; + let height_top = (rectangle.height * ratio).round(); let height_bottom = rectangle.height - height_top; ( |