Round region dimensions of panes to avoid overlaps

This commit is contained in:
Héctor Ramón Jiménez 2020-03-11 23:26:45 +01:00
parent df6e3f8da9
commit f09b4bd4f4

View file

@ -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;
(