We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
0.9
1 parent 7a479b1 commit 1b90436Copy full SHA for 1b90436
src/components/commit.rs
@@ -17,7 +17,7 @@ use tui::{
17
backend::Backend,
18
layout::{Alignment, Rect},
19
style::{Color, Style},
20
- widgets::{Block, Borders, Paragraph, Text},
+ widgets::{Block, Borders, Clear, Paragraph, Text},
21
Frame,
22
};
23
@@ -40,17 +40,17 @@ impl DrawableComponent for CommitComponent {
40
[Text::Raw(Cow::from(self.msg.clone()))]
41
42
43
+ let area = ui::centered_rect(60, 20, f.size());
44
+ f.render_widget(Clear, area);
45
f.render_widget(
- ui::Clear::new(
- Paragraph::new(txt.iter())
46
- .block(
47
- Block::default()
48
- .title(strings::COMMIT_TITLE)
49
- .borders(Borders::ALL),
50
- )
51
- .alignment(Alignment::Left),
52
- ),
53
- ui::centered_rect(60, 20, f.size()),
+ Paragraph::new(txt.iter())
+ .block(
+ Block::default()
+ .title(strings::COMMIT_TITLE)
+ .borders(Borders::ALL),
+ )
+ .alignment(Alignment::Left),
+ area,
54
);
55
}
56
src/components/help.rs
@@ -12,7 +12,7 @@ use tui::{
12
13
layout::{Alignment, Constraint, Direction, Layout, Rect},
14
15
16
@@ -41,12 +41,11 @@ impl DrawableComponent for HelpComponent {
let area =
ui::centered_rect_absolute(65, height, f.size());
- .title(strings::HELP_TITLE)
+ .title(strings::HELP_TITLE)
area,
src/components/msg.rs
@@ -9,7 +9,7 @@ use strings::commands;
9
use tui::{
10
11
@@ -24,18 +24,18 @@ impl DrawableComponent for MsgComponent {
24
if self.visible {
25
let txt = vec![Text::Raw(Cow::from(self.msg.as_str()))];
26
27
+ let area = ui::centered_rect_absolute(65, 25, f.size());
28
29
30
31
32
- .title(strings::MSG_TITLE)
33
34
35
- .wrap(true)
36
37
38
- ui::centered_rect_absolute(65, 25, f.size()),
+ .title(strings::MSG_TITLE)
+ .wrap(true)
39
src/components/reset.rs
@@ -14,7 +14,7 @@ use tui::{
@@ -34,17 +34,17 @@ impl DrawableComponent for ResetComponent {
Style::default().fg(Color::Red),
));
+ let area = ui::centered_rect(30, 20, f.size());
- .title(strings::RESET_TITLE)
- ui::centered_rect(30, 20, f.size()),
+ .title(strings::RESET_TITLE)
src/ui/clear.rs
src/ui/mod.rs
@@ -1,7 +1,5 @@
1
-mod clear;
2
mod scrolllist;
3
4
-pub use clear::Clear;
5
use scrolllist::ScrollableList;
6
7
0 commit comments