Skip to content

Commit

Permalink
Merge branch 'master' into commit-popup-#80
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/components/textinput.rs
  • Loading branch information
Stephan Dilly committed Jun 8, 2020
2 parents 32d7446 + 4caf8dd commit 48469bb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
5 changes: 3 additions & 2 deletions src/components/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, BorderType, Borders, Clear, Paragraph, Text},
Frame,
};

Expand Down Expand Up @@ -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,
);

Expand Down
5 changes: 3 additions & 2 deletions src/components/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand Down
24 changes: 13 additions & 11 deletions src/components/textinput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -75,12 +73,16 @@ 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(),
&self.theme,
true,
),
Paragraph::new(txt.iter())
.block(
Block::default()
.title(self.title.as_str())
.borders(Borders::ALL)
.border_type(BorderType::Thick)
.title_style(self.theme.title(true))
.border_style(self.theme.block(true)),
)
.alignment(Alignment::Left),
area,
);
}
Expand Down

0 comments on commit 48469bb

Please sign in to comment.