refactor: get_horizotal/vertical contraints into single method

This commit is contained in:
Jack Wills
2023-02-27 14:50:04 +00:00
parent 074cb957f2
commit e8f5cf9c6f
2 changed files with 29 additions and 17 deletions
+2 -4
View File
@@ -651,12 +651,10 @@ fn popup(text_lines: usize, text_width: usize, r: Rect, box_location: BoxLocatio
1
};
let v_constraints = box_location.get_vertical_constraints(
let (h_constraints, v_constraints) = box_location.get_constraints(
blank_horizontal.try_into().unwrap_or_default(),
blank_vertical.try_into().unwrap_or_default(),
text_lines.try_into().unwrap_or_default(),
);
let h_constraints = box_location.get_horizontal_constraints(
blank_horizontal.try_into().unwrap_or_default(),
text_width.try_into().unwrap_or_default(),
);