This commit is contained in:
2026-07-15 09:29:59 +02:00
parent 72667f3a84
commit 755f6476c5
3 changed files with 51 additions and 20 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ impl Rect {
}
pub fn layout(rows: Vec<LayoutItem>) -> LayoutItem {
LayoutItem::Columns {
LayoutItem::Rows {
unit: Size::Percent(100),
items: rows,
}
+30
View File
@@ -23,3 +23,33 @@ impl Widget for Outline {
scope.draw_text((scope.rect.width - 1, scope.rect.height - 1), "┘");
}
}
pub struct TVLine;
impl Widget for TVLine {
fn render(&self, scope: &mut crate::render::RenderScope) {
scope.draw_text(0, "─".repeat(scope.rect.width as usize));
scope.draw_text(0, "┌");
scope.draw_text((scope.rect.width - 1, 0), "┐");
}
}
pub struct BVLine;
impl Widget for BVLine {
fn render(&self, scope: &mut crate::render::RenderScope) {
scope.draw_text(0, "─".repeat(scope.rect.width as usize));
scope.draw_text(0, "└");
scope.draw_text((scope.rect.width - 1, 0), "┘");
}
}
pub struct VLine;
impl Widget for VLine {
fn render(&self, scope: &mut crate::render::RenderScope) {
scope.draw_text(0, "─".repeat(scope.rect.width as usize));
}
}