mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-22 19:29:14 +03:00
thick borders on popups
This commit is contained in:
parent
17f6f332c3
commit
4ea8124a10
@ -12,7 +12,7 @@ use tui::{
|
||||
backend::Backend,
|
||||
layout::{Alignment, Constraint, Direction, Layout, Rect},
|
||||
style::{Modifier, Style},
|
||||
widgets::{Block, Borders, Clear, Paragraph, Text},
|
||||
widgets::{Block, Borders, Clear, Paragraph, Text, BorderType},
|
||||
Frame,
|
||||
};
|
||||
|
||||
@ -45,7 +45,8 @@ impl DrawableComponent for HelpComponent {
|
||||
f.render_widget(
|
||||
Block::default()
|
||||
.title(strings::HELP_TITLE)
|
||||
.borders(Borders::ALL),
|
||||
.borders(Borders::ALL)
|
||||
.border_type(BorderType::Thick),
|
||||
area,
|
||||
);
|
||||
|
||||
|
@ -30,7 +30,7 @@ use tui::{
|
||||
backend::Backend,
|
||||
layout::Alignment,
|
||||
layout::Rect,
|
||||
widgets::{Block, Borders, Paragraph, Text},
|
||||
widgets::{Block, BorderType, Borders, Paragraph, Text},
|
||||
Frame,
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,7 @@ use strings::commands;
|
||||
use tui::{
|
||||
backend::Backend,
|
||||
layout::{Alignment, Rect},
|
||||
widgets::{Block, Borders, Clear, Paragraph, Text},
|
||||
widgets::{Block, BorderType, Borders, Clear, Paragraph, Text},
|
||||
Frame,
|
||||
};
|
||||
use ui::style::Theme;
|
||||
@ -41,7 +41,8 @@ impl DrawableComponent for MsgComponent {
|
||||
Block::default()
|
||||
.title(strings::MSG_TITLE_ERROR)
|
||||
.title_style(self.theme.text_danger())
|
||||
.borders(Borders::ALL),
|
||||
.borders(Borders::ALL)
|
||||
.border_type(BorderType::Thick),
|
||||
)
|
||||
.alignment(Alignment::Left)
|
||||
.wrap(true),
|
||||
|
@ -2,18 +2,16 @@ use super::{
|
||||
visibility_blocking, CommandBlocking, CommandInfo, Component,
|
||||
DrawableComponent,
|
||||
};
|
||||
use crate::{
|
||||
components::dialog_paragraph, strings, ui, ui::style::Theme,
|
||||
};
|
||||
use crate::{strings, ui, ui::style::Theme};
|
||||
use anyhow::Result;
|
||||
use crossterm::event::{Event, KeyCode};
|
||||
use std::borrow::Cow;
|
||||
use strings::commands;
|
||||
use tui::{
|
||||
backend::Backend,
|
||||
layout::Rect,
|
||||
layout::{Alignment, Rect},
|
||||
style::Style,
|
||||
widgets::{Clear, Text},
|
||||
widgets::{Block, BorderType, Borders, Clear, Paragraph, Text},
|
||||
Frame,
|
||||
};
|
||||
|
||||
@ -75,7 +73,14 @@ impl DrawableComponent for TextInputComponent {
|
||||
let area = ui::centered_rect(60, 20, f.size());
|
||||
f.render_widget(Clear, area);
|
||||
f.render_widget(
|
||||
dialog_paragraph(self.title.as_str(), txt.iter()),
|
||||
Paragraph::new(txt.iter())
|
||||
.block(
|
||||
Block::default()
|
||||
.title(self.title.as_str())
|
||||
.borders(Borders::ALL)
|
||||
.border_type(BorderType::Thick),
|
||||
)
|
||||
.alignment(Alignment::Left),
|
||||
area,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user