mirror of
https://github.com/forkless/NotAlterra.git
synced 2026-08-21 10:28:59 +02:00
Document centered_rect layout helpers
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user