diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs index bd009e7..e604b40 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -87,21 +87,23 @@ fn on_submit(s: &mut Cursive, name: &String) { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | // get the act together | 89 | // get the act together |
90 | let mut article_content = TextView::new(heading); | 90 | let article_content = TextView::new(extract_formatter(extract)); |
91 | article_content.append(String::from("\n\n")); | ||
92 | article_content.append(extract_formatter(extract)); | ||
93 | 91 | ||
94 | let links = SelectView::<String>::new() | 92 | let links = SelectView::<String>::new() |
95 | .with_all_str(link_vec) | 93 | .with_all_str(link_vec) |
96 | .on_submit(on_submit); | 94 | .on_submit(on_submit) |
95 | .fixed_width(20); | ||
97 | 96 | ||
98 | s.add_layer( | 97 | s.add_layer( |
99 | OnEventView::new( | 98 | Dialog::around( |
100 | LinearLayout::horizontal() | 99 | OnEventView::new( |
101 | .child(article_content.fixed_width(72)) | 100 | LinearLayout::horizontal() |
102 | .child(DummyView) | 101 | .child(article_content.fixed_width(72)) |
103 | .child(links) | 102 | .child(DummyView) |
103 | .child(links) | ||
104 | ) | ||
105 | .on_event('t', |s| match s.pop_layer() { _ => () }) | ||
104 | ) | 106 | ) |
105 | .on_event('t', |s| match s.pop_layer() { _ => () }) | 107 | .title(heading) |
106 | ); | 108 | ); |
107 | } | 109 | } |