diff --git a/src/tui.rs b/src/tui.rs index 96f6c69..9dfc287 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -274,6 +274,8 @@ pub fn draw_ok_dialog_styled(f: &mut Frame, app: &AppState, title: &str, lines: draw_whale_separator(f, bar, app); } +/// Return a rectangle centered in `r` by the given width and height percentages. +/// Shrink a rectangle to the given absolute width and height, centered. /// Return a rectangle centered in `r` by the given width and height percentages. fn centered_rect_size(w: u16, h: u16, r: Rect) -> Rect { let popup = Layout::default().direction(Direction::Vertical) @@ -645,6 +647,7 @@ fn truncate_path_tail(path: &str, max_width: usize) -> String { /// Create a centered rectangle for modal overlays. /// Return a rectangle centered in `r` by the given width and height percentages. +/// Return a rectangle centered in `r` by the given width and height percentages. fn centered_rect(percent_x: u16, percent_y: u16, r: Rect) -> Rect { let popup_layout = Layout::default() .direction(Direction::Vertical)