lorem example: remove unnecessary full_screen()

This commit is contained in:
Alexandre Bury 2018-05-07 23:17:07 -07:00
parent 20cb033b8d
commit 4a3bbbb998

View File

@ -1,9 +1,8 @@
extern crate cursive; extern crate cursive;
use cursive::Cursive;
use cursive::align::HAlign; use cursive::align::HAlign;
use cursive::view::Boxable;
use cursive::views::{Dialog, Panel, TextView}; use cursive::views::{Dialog, Panel, TextView};
use cursive::Cursive;
fn main() { fn main() {
// Read some long text from a file. // Read some long text from a file.
@ -18,11 +17,10 @@ fn main() {
// and will adapt to the terminal size. // and will adapt to the terminal size.
siv.add_fullscreen_layer( siv.add_fullscreen_layer(
Dialog::around(Panel::new(TextView::new(content))) Dialog::around(Panel::new(TextView::new(content)))
.title("Unicode and wide-character support")
// This is the alignment for the button // This is the alignment for the button
.h_align(HAlign::Center) .h_align(HAlign::Center)
.button("Quit", |s| s.quit()) .button("Quit", |s| s.quit()),
.title("Unicode and wide-character support")
.full_screen(),
); );
// Show a popup on top of the view. // Show a popup on top of the view.
siv.add_layer(Dialog::info( siv.add_layer(Dialog::info(