mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-10 13:46:42 +01:00
lanes and grids
This commit is contained in:
parent
788dc1ccde
commit
ac865824cc
12 changed files with 213 additions and 112 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue