From c3496c9870dc69193e90b4a6628dbc6218aec1ab Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Tue, 26 May 2015 23:49:07 -0700 Subject: [PATCH] Update edit example Added top padding to dialog and a `!` to message. --- examples/edit.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/edit.rs b/examples/edit.rs index ec6f370..dde26c6 100644 --- a/examples/edit.rs +++ b/examples/edit.rs @@ -8,12 +8,13 @@ fn main() { // Create a dialog with an edit text and a button. siv.add_layer(Dialog::new(IdView::new("edit", EditView::new().min_length(20))) + .padding((1,1,1,0)) .title("Enter your name") .button("Ok", |s| { // When the button is clicked, read the text and print it in a new dialog. let content = { let name = s.find::(&Selector::Id("edit")).unwrap().get_content(); - format!("Hello {}", name) + format!("Hello {}!", name) }; s.pop_layer(); s.add_layer(Dialog::new(TextView::new(&content))