From fb70b45e58a70a55119b44627ebe56d458893055 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Sun, 14 Jan 2018 22:50:04 -0500 Subject: [PATCH] Messagebox --- Core.cs | 4 ++-- Terminal.csproj | 1 + Views/Dialog.cs | 23 ++++++++++++++++++++++- Views/Label.cs | 42 ++++++++++++++++++++++++++++++------------ Views/MessageBox.cs | 41 +++++++++++++++++++++++++++++++++++++++++ demo.cs | 8 +++++++- 6 files changed, 103 insertions(+), 16 deletions(-) create mode 100644 Views/MessageBox.cs diff --git a/Core.cs b/Core.cs index 302c89cb3..1b69173ba 100644 --- a/Core.cs +++ b/Core.cs @@ -800,8 +800,8 @@ namespace Terminal { public Window (Rect frame, string title = null) : base (frame) { this.Title = title; - frame.Inflate (-1, -1); - contentView = new ContentView (frame); + var cFrame = new Rect (1, 1, frame.Width - 2, frame.Height - 2); + contentView = new ContentView (cFrame); base.Add (contentView); } diff --git a/Terminal.csproj b/Terminal.csproj index 55a6a60ee..219382981 100644 --- a/Terminal.csproj +++ b/Terminal.csproj @@ -47,6 +47,7 @@ + diff --git a/Views/Dialog.cs b/Views/Dialog.cs index 3a50325ee..084ec3009 100644 --- a/Views/Dialog.cs +++ b/Views/Dialog.cs @@ -16,6 +16,13 @@ namespace Terminal { public class Dialog : Window { List