diff options
author | 2020-03-11 23:26:45 +0100 | |
---|---|---|
committer | 2020-03-11 23:26:45 +0100 | |
commit | f09b4bd4f4113872eeac67320e79f81eac0a948f (patch) | |
tree | b4d5905e165479382de7e10efb934411486f2ad4 /native | |
parent | df6e3f8da921a98c9a1e75a1790885a07485ee45 (diff) | |
download | iced-f09b4bd4f4113872eeac67320e79f81eac0a948f.tar.gz iced-f09b4bd4f4113872eeac67320e79f81eac0a948f.tar.bz2 iced-f09b4bd4f4113872eeac67320e79f81eac0a948f.zip |
Round region dimensions of panes to avoid overlaps
Diffstat (limited to 'native')
-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; ( |