diff --git a/cursive-core/src/views/dialog.rs b/cursive-core/src/views/dialog.rs index 2d868a2..eada861 100644 --- a/cursive-core/src/views/dialog.rs +++ b/cursive-core/src/views/dialog.rs @@ -8,7 +8,7 @@ use crate::views::{BoxedView, Button, DummyView, LastSizeView, TextView}; use crate::Cursive; use crate::Printer; use crate::Vec2; -use crate::With; +use crate::{utils::markup::StyledString, With}; use std::cell::Cell; use std::cmp::max; use unicode_width::UnicodeWidthStr; @@ -159,7 +159,7 @@ impl Dialog { /// let dialog = Dialog::text("Hello!") /// .button("Quit", |s| s.quit()); /// ``` - pub fn text>(text: S) -> Self { + pub fn text>(text: S) -> Self { Self::around(TextView::new(text)) } @@ -174,7 +174,7 @@ impl Dialog { /// /// let dialog = Dialog::info("Some very important information!"); /// ``` - pub fn info>(text: S) -> Self { + pub fn info>(text: S) -> Self { Dialog::text(text).dismiss_button("Ok") }