You computed layout rectangles with float precision. Now you need them as ratatui::layout::Rect without gaps between adjacent panels.
panes-ratatui converts panes layouts into ratatui rects with pixel-perfect edge rounding.
Install
cargo add panes panes-ratatui
Usage
use Layout;
let resolved = master_stack
.resolve?;
let rects = convert;
for in &rects
Adjacent panels sharing a float boundary produce matching integer edges. No gaps, no overlaps.
Focus-aware iteration
focused_panels pairs each entry with a bool indicating focus. A panel is focused when its id matches the given PanelId, or when it is a decoration panel whose content kind matches the focused panel's kind.
for in focused_panels
focused_panels_at adds origin offset for nested layouts.
License
MIT or Apache 2.0, at your option. See LICENSE-MIT and LICENSE-APACHE.