mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-10 03:10:41 +00:00
lorem example: remove unnecessary full_screen()
This commit is contained in:
parent
20cb033b8d
commit
4a3bbbb998
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user