mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-22 02:50:45 +08:00
lib: Add border-like separator to imUI
This commit is contained in:
+12
-3
@@ -7,7 +7,8 @@ use std::time::Duration;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
use ratatui::text::Text;
|
||||
use ratatui::style::Stylize;
|
||||
use ratatui::text::{Span, Text};
|
||||
use tokio::sync::broadcast;
|
||||
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
|
||||
|
||||
@@ -447,8 +448,16 @@ where
|
||||
}
|
||||
|
||||
pub fn overline(&mut self, frame: &mut Frame) -> Response {
|
||||
let overline = String::from("━").repeat(256);
|
||||
self.label(frame, overline)
|
||||
let overline = String::from("▔").repeat(256);
|
||||
self.label(frame, Span::raw(overline).cyan())
|
||||
}
|
||||
|
||||
pub fn separator(&mut self, frame: &mut Frame) -> Response {
|
||||
let overline = String::from("─").repeat(256);
|
||||
self.label(
|
||||
frame,
|
||||
Span::raw(overline).fg(self.theme.border_style.fg.unwrap_or_default()),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn table<'a, R, const W: usize>(
|
||||
|
||||
Reference in New Issue
Block a user