mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-21 12:59:41 +00:00
Implement Rounded corners (#918)
* add rounded corners * more * apply rounded corners to script boxes as well
This commit is contained in:
parent
e463037e69
commit
c36879e22f
|
@ -60,6 +60,7 @@ impl FloatContent for ConfirmPrompt {
|
|||
fn draw(&mut self, frame: &mut Frame, area: Rect) {
|
||||
let block = Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.title(" Confirm selections ")
|
||||
.title_bottom(" [y] to continue, [n] to abort ")
|
||||
.title_alignment(Alignment::Center)
|
||||
|
|
|
@ -123,7 +123,12 @@ impl Filter {
|
|||
|
||||
//Create the search bar widget
|
||||
let search_bar = Paragraph::new(display_text)
|
||||
.block(Block::default().borders(Borders::ALL).title(" Search "))
|
||||
.block(
|
||||
Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.title(" Search "),
|
||||
)
|
||||
.style(Style::default().fg(search_color));
|
||||
|
||||
//Render the search bar (First chunk of the screen)
|
||||
|
|
|
@ -216,6 +216,7 @@ impl FloatContent for FloatingText {
|
|||
// Define the Block with a border and background color
|
||||
let block = Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.title(self.mode_title.clone())
|
||||
.title_alignment(ratatui::layout::Alignment::Center)
|
||||
.title_style(Style::default().reversed())
|
||||
|
|
|
@ -53,6 +53,7 @@ impl FloatContent for RunningCommand {
|
|||
// Display a block indicating the command is running
|
||||
Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.title_top(Line::from("Running the command....").centered())
|
||||
.title_style(Style::default().reversed())
|
||||
.title_bottom(Line::from("Press Ctrl-C to KILL the command"))
|
||||
|
@ -80,6 +81,7 @@ impl FloatContent for RunningCommand {
|
|||
|
||||
Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.title_top(title_line.centered())
|
||||
};
|
||||
|
||||
|
|
|
@ -217,9 +217,9 @@ impl AppState {
|
|||
self.drawable = true;
|
||||
}
|
||||
|
||||
let label_block =
|
||||
Block::default()
|
||||
.borders(Borders::all())
|
||||
let label_block = Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.border_set(ratatui::symbols::border::Set {
|
||||
top_left: " ",
|
||||
top_right: " ",
|
||||
|
@ -253,7 +253,8 @@ impl AppState {
|
|||
|
||||
let keybinds_block = Block::default()
|
||||
.title(format!(" {} ", keybind_scope))
|
||||
.borders(Borders::all());
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED);
|
||||
|
||||
let keybinds = create_shortcut_list(shortcuts, keybind_render_width);
|
||||
let n_lines = keybinds.len() as u16;
|
||||
|
@ -297,7 +298,11 @@ impl AppState {
|
|||
};
|
||||
|
||||
let list = List::new(tabs)
|
||||
.block(Block::default().borders(Borders::ALL))
|
||||
.block(
|
||||
Block::default()
|
||||
.borders(Borders::ALL)
|
||||
.border_set(ratatui::symbols::border::ROUNDED),
|
||||
)
|
||||
.highlight_style(tab_hl_style)
|
||||
.highlight_symbol(self.theme.tab_icon());
|
||||
frame.render_stateful_widget(list, left_chunks[1], &mut self.current_tab);
|
||||
|
@ -409,6 +414,7 @@ impl AppState {
|
|||
.block(
|
||||
Block::default()
|
||||
.borders(Borders::ALL & !Borders::RIGHT)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.title(title)
|
||||
.title_bottom(bottom_title),
|
||||
)
|
||||
|
@ -418,6 +424,7 @@ impl AppState {
|
|||
let disclaimer_list = List::new(task_items).highlight_style(style).block(
|
||||
Block::default()
|
||||
.borders(Borders::ALL & !Borders::LEFT)
|
||||
.border_set(ratatui::symbols::border::ROUNDED)
|
||||
.title(task_list_title),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user