generated from GarandPLG/rust-flake-template
Add resize handling and non-blocking input loop
Use `recv_timeout` to prevent UI blocking, forward terminal resize events, adjust keybinding width calculation, and replace percentage layout with fill/length for the main menu.
This commit is contained in:
@@ -27,8 +27,7 @@ fn view_options() -> Vec<(usize, String)> {
|
||||
}
|
||||
|
||||
pub fn main_menu_widget(app: &App, area: Rect, buf: &mut Buffer) {
|
||||
let vertical_layout: Layout =
|
||||
Layout::vertical([Constraint::Percentage(92), Constraint::Percentage(8)]);
|
||||
let vertical_layout: Layout = Layout::vertical([Constraint::Fill(1), Constraint::Length(4)]);
|
||||
|
||||
let [main_menu_area, keybindings_area] = vertical_layout.areas(area);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user