ratkit 0.2.15

A comprehensive collection of reusable TUI components for ratatui including resizable splits, tree views, markdown rendering, toast notifications, dialogs, and terminal embedding
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Viewer content-area geometry for the code widget.

use ratatui::layout::Rect;

/// Returns the viewer content area before the statusline.
pub(crate) fn viewer_content_area(area: Rect) -> Rect {
    if area.height > 1 {
        Rect {
            height: area.height.saturating_sub(1),
            ..area
        }
    } else {
        area
    }
}