lanes and grids

This commit is contained in:
🪞👃🪞 2024-06-12 18:38:16 +03:00
parent 788dc1ccde
commit ac865824cc
12 changed files with 213 additions and 112 deletions

View file

@ -28,7 +28,6 @@ impl<'a> WidgetRef for ActionBar<'a> {
}
pub fn draw_leaf (buffer: &mut Buffer, area: Rect, y: u16, x: u16, text: &str) {
use ratatui::style::{Style, Stylize};
let border = Style::default().gray().dim();
let label = Style::default();
let side = String::from("");
@ -40,7 +39,9 @@ pub fn draw_leaf (buffer: &mut Buffer, area: Rect, y: u16, x: u16, text: &str) {
}
pub fn draw_box (buffer: &mut Buffer, area: Rect) {
use ratatui::style::{Style, Stylize};
if area.width < 1 || area.height < 1 {
return
}
let border = Style::default().gray().dim();
let top = format!("{}", "".repeat((area.width - 2).into()));
let bottom = format!("{}", "".repeat((area.width - 2).into()));
@ -53,7 +54,6 @@ pub fn draw_box (buffer: &mut Buffer, area: Rect) {
}
pub fn draw_focus_corners (buffer: &mut Buffer, area: Rect) {
use ratatui::style::{Style, Stylize};
let focus = Style::default().yellow().bold().not_dim();
buffer.set_string(area.x, area.y, "", focus);
buffer.set_string(area.x + area.width - 1, area.y, "", focus);