diff --git a/Terminal.Gui/Core/ConsoleDriver.cs b/Terminal.Gui/Core/ConsoleDriver.cs
index fb3015893..72bd854b1 100644
--- a/Terminal.Gui/Core/ConsoleDriver.cs
+++ b/Terminal.Gui/Core/ConsoleDriver.cs
@@ -562,7 +562,7 @@ namespace Terminal.Gui {
const char bottomChar = clearChar;
#endif
///
- /// Draws a frame for a window with padding aand n optional visible border inside the padding.
+ /// Draws a frame for a window with padding and an optional visible border inside the padding.
///
/// Screen relative region where the frame will be drawn.
/// Number of columns to pad on the left (if 0 the border will not appear on the left).
@@ -724,7 +724,7 @@ namespace Terminal.Gui {
// DrawFrame assumes the border is always at least one row/col thick
// DrawWindowFrame assumes a padding of 0 means NO padding and no frame
DrawWindowFrame (new Rect (region.X, region.Y, region.Width, region.Height),
- padding + 1, padding + 1, padding + 1, padding + 1, fill: fill);
+ padding + 1, padding + 1, padding + 1, padding + 1, border: false, fill: fill);
}
diff --git a/Terminal.Gui/Core/View.cs b/Terminal.Gui/Core/View.cs
index cef542eba..fa5988253 100644
--- a/Terminal.Gui/Core/View.cs
+++ b/Terminal.Gui/Core/View.cs
@@ -714,7 +714,7 @@ namespace Terminal.Gui {
{
var scrRect = ViewToScreen (region);
var savedClip = ClipToBounds ();
- Driver.DrawFrame (scrRect, padding, fill);
+ Driver.DrawWindowFrame (scrRect, padding + 1, padding + 1, padding + 1, padding + 1, border: true, fill: fill);
Driver.Clip = savedClip;
}
diff --git a/Terminal.Gui/Core/Window.cs b/Terminal.Gui/Core/Window.cs
index 2bf4d4bf1..37184cbf0 100644
--- a/Terminal.Gui/Core/Window.cs
+++ b/Terminal.Gui/Core/Window.cs
@@ -164,7 +164,7 @@ namespace Terminal.Gui {
// BUGBUG: Why do we draw the frame twice? This call is here to clear the content area, I think. Why not just clear that area?
if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
Driver.SetAttribute (ColorScheme.Normal);
- Driver.DrawFrame (scrRect, padding, true);
+ Driver.DrawWindowFrame (scrRect, padding + 1, padding + 1, padding + 1, padding + 1, border: true, fill: true);
}
var savedClip = ClipToBounds ();
@@ -173,7 +173,7 @@ namespace Terminal.Gui {
ClearNeedsDisplay ();
Driver.SetAttribute (ColorScheme.Normal);
- Driver.DrawFrame (scrRect, padding, false);
+ Driver.DrawWindowFrame (scrRect, padding + 1, padding + 1, padding + 1, padding + 1, border: true, fill: false);
if (HasFocus)
Driver.SetAttribute (ColorScheme.HotNormal);
diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj
index 01697a423..77c3a2342 100644
--- a/Terminal.Gui/Terminal.Gui.csproj
+++ b/Terminal.Gui/Terminal.Gui.csproj
@@ -5,11 +5,12 @@
Terminal.Guibin\Release\Terminal.Gui.xmltrue
+ 0.82.0.0trueTerminal.Gui
- 0.81
+ 0.82Miguel de IcazaMIThttps://github.com/migueldeicaza/gui.cs/
@@ -18,80 +19,141 @@
Miguel de IcazaApplication framework for creating modern console applications using .NET Gui.cs is a framework for creating console user interfaces
- 0.81: Fix ncurses engine for macOS/Linux, it works again
+
+ 0.82: Many fixes
+ * API documentation completely revamped and updated. Readme upated. Contributors guide added (Thanks @tig!)
+ * New sample/demo app - UI Catalog - Replaces demo.cs with an easy to use and extend set of demo scenarios. (Thanks @tig!)
+ * MenuBar can now have MenuItems directly (enables top-level menu items with no submenu). (Thanks @tig!)
+ * Apps can now get KeyUp/KeyDown events. (Thanks @tig!)
+ * Fixes #396 - Text alignnment issues. (Thanks @tig!)
+ * Fixes #423 - Fix putting results of ocgv on command line erases cursor. (Thanks @tig!)
+ * Example/Designer csproj files updated to latest Visual Studio model. (Thanks @tig!)
+ * Adjusted the default colors for Windows to make more readable. (Thanks @tig!)
+ * Toplevel.Ready event - Fired once the Toplevel's MainLoop has started (#445). (Thanks @tig!)
+ * Refactored several events to use event vs. Action. (BREAKING CHANGE) (Thanks @tig!)
+ * All compile warnings fixed. (Thanks @tig!)
+ * Fixed a crash in EnsureVisibleBounds. (Thanks @tig!)
+ * Application.Init/Shutdown are more robust. (Thanks @tig!)
+ * New "Draw Window Frame" code; consistent across Window, FrameView, and Menu. Fixes many drawing bugs. (Thanks @tig!)
+ * The project has been refactored an reorganized to reduce risk of bugs and make it easier to contribute #541. (Thanks @tig!)
+ * Fixes #522 - Last view of Frameview not drawn. (Thanks @tig!)
+ * Clipping has been fixed/restored - it now works properly. (#586) (Thanks @tig!)
+ * Added a View.LayoutComplete event (#569). (Thanks @tig!)
+ * Fixes #299 - MessageBox now auto sizes. (Thanks @tig!)
+ * Fixes #557 - MessageBoxes on small screens. (Thanks @tig!)
+ * Fixes #432 - MessageBox does not deal with long text; width/height params are goofy. (Thanks @tig!)
+ * Fixes #35 - Dialog should have 1 char padding. (Thanks @tig!)
+ * `MessageBox.Query` called with `width` and `height` == 0 get auto-size behavior. A new constructor is added making this easy to use. (Thanks @tig!)
+ * Multi-line `MessageBox`es are now supported. Just use `\n` to add lines. The height of the MessageBox will adjust automatically. (Thanks @tig!)
+ * The `MessageBoxes` Scenario in UI Catalog provides a full demo/test-case. (Thanks @tig!)
+ * `Dialog` called with `width` and `height` == 0 are sized to 85% container. A new constructor is added making this easy to use. (Thanks @tig!)
+ * Dialog (and MessageBox `Buttons` are now dynamically laid out using Computed layout. (Thanks @tig!)
+ * A `Dialogs` Scenario has been added to UI Catalog making it easy to test the API. (Thanks @tig!)
+ * `Button` now supports BOTH specifying a hotkey with '_' and the old behavior of using the first uppercase char (if '_' is not found). (Thanks @tig!)
+ * All UI Catalog scenarios that use `Dialog` or `MessageBox` now use the simplified API. (Thanks @tig!)
+ * `Terminal.Gui.dll` now has version metadata and UI Catalog's about box displays it as a test case. (Thanks @tig!)
+ * Button, Dialog, and MessageBox API documentation has been updated/revised. (Thanks @tig!)
+ * `View`, `Window`, `FrameView`, and `Dialog` have been upgraded to use the new `ConsoleDriver.DrawFrameWindow` API directly. (Thanks @tig!)
+ * New ComboBox control (Thanks @fergusonr!)
+ * ConsoleDriver now supports improved KeyModifers (shift keys) with an expanded Keys Sceanrio in UI Catalog. (Thanks @bdisp!)
+ * Tons of mouse handling improvements. (Thanks @bdisp!)
+ * Fsharp sample updated. (Thanks @bdisp!)
+ * Fixes #562 - Background drawing issue. (Thanks @bdisp!)
+ * Fixes #517 - Focus and mouse handlers enahced (BREAKING CHANGE). (Thanks @bdisp!)
+ * Fixed resizing update and correct Toplevel colors without colors. (Thanks @bdisp!)
+ * Fixed #515, #518, #536, #540. (Thanks @bdisp!)
+ * Added Threading Scenario to UI catalog. (Thanks @bdisp!)
+ * Added support for F11 and F12 keys. (Thanks @bdisp!)
+ * Multiple improvements to Date/TimeField. (Thanks @bdisp!)
+ * Fixes #409 - Invoke does not cause Wakeup #501. (Thanks @bdisp!)
+ * Fixed Label text alignemnt. (Thanks @bdisp!)
+ * Added mouse features in the Unix version. Supports xterm-1006. (Thanks @bdisp!)
+ * Several StatusBar fixes. (Thanks @bdisp!)
+ * Tons of mouse improvements including mouse wheel support (e.g. #404, #409). (Thanks @bdisp!)
+ * Added a CloseFile method to the TextView as stated in #452. (Thanks @bdisp)
+ * Added a OpenSelectedItem event to the ListView #429. (Thanks @bdisp!)
+ * Fixes the return value of the position cursor in the TextField. (Thanks @bdisp!)
+ * Updates screen on Unix window resizing. (Thanks @bdisp!)
+ * Fixes the functions of the Edit->Copy-Cut-Paste menu for the TextField that was not working well. (Thanks @bdisp!)
+ * More robust error handing in Pos/Dim. Fixes #355 stack overflow with Pos based on the size of windows at startup. Added a OnResized action to set the Pos after the terminal are resized. (Thanks @bdisp!)
+ * Fixes #389 Window layouting breaks when resizing. (Thanks @bdisp!)
+ * Fixes #557 MessageBox needs to take ustrings (BREAKING CHANGE). (Thanks @tig!)
-* Fixes an issue with referencing views that have not been allocated yet causing a stack overflow
-* New OnCloseMenu event on menus
-* Button cursor position looks better
-* Listview in single-selection mode uses a radio-button look
-* Fixes a couple of crashes (356)
-* Default the samples to work on Catalina
+ 0.81:
+ * Fix ncurses engine for macOS/Linux, it works again
+ * Fixes an issue with referencing views that have not been allocated yet causing a stack overflow
+ * New OnCloseMenu event on menus
+ * Button cursor position looks better
+ * Listview in single-selection mode uses a radio-button look
+ * Fixes a couple of crashes (356)
+ * Default the samples to work on Catalina
-0.80: Jumbo update from BDisp:
+ 0.80: Jumbo update from BDisp:
-* Fixed key events traversal for modal dialogs
-* Fixes culture info of DataField from pr
-* Fixes the rectangle drawing issue
-* Redraw issue when setting coordinates of label
-* Added sub menus into menu bar with mouse and key navigation
-* Added Colors.Menu.Disabled to CursesDriver.cs
-* Mouse text selection with cut, copy and paste on text fields
-* Change sepChar from char to string in DateField
-* Adding a disabled menu item in the demo file
-* Fixes Button repainting issue when changing the text length to one smaller
-* Fixes Redraw issue when setting coordinates of label
-* Fixes ScrollView does not render some content
-* Fixed bug in Button that caused a loop redraw calling TerminalResized
-* Fixes a repaint issue (282)
-* Mouse features added to FileDialog including wheel support.
-* Switch netcoreapp target to netstandard2.0
-* Added TextView.TextChanged event
-* Fixes issue #306 async/await hang (#312)
-* Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
-* Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
-* Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
-* Minor change to Core.cs::Application.Init(Func) for better initialization status tracking, via backend property instead of relying on the Top field.
-* Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)
-* Resizing the MessageBox width to accommodate all message text (#299)
-* Timefield format with bounds values (#303)
-* Implemented lower and upper bounds to TimeField
-* Passing old text to the Changed event handler
-* Extract methods on ListView to make it controlable from other controls
+ * Fixed key events traversal for modal dialogs
+ * Fixes culture info of DataField from pr
+ * Fixes the rectangle drawing issue
+ * Redraw issue when setting coordinates of label
+ * Added sub menus into menu bar with mouse and key navigation
+ * Added Colors.Menu.Disabled to CursesDriver.cs
+ * Mouse text selection with cut, copy and paste on text fields
+ * Change sepChar from char to string in DateField
+ * Adding a disabled menu item in the demo file
+ * Fixes Button repainting issue when changing the text length to one smaller
+ * Fixes Redraw issue when setting coordinates of label
+ * Fixes ScrollView does not render some content
+ * Fixed bug in Button that caused a loop redraw calling TerminalResized
+ * Fixes a repaint issue (282)
+ * Mouse features added to FileDialog including wheel support.
+ * Switch netcoreapp target to netstandard2.0
+ * Added TextView.TextChanged event
+ * Fixes issue #306 async/await hang (#312)
+ * Replaced static driver initialization with property getter for reference passing in Core.cs::View class, this allows the library to be reinitialized at any time.
+ * Made the Shutdown method on Core.cs::Application class public, since there is no reason to keep it private. Applications can shutdown the library and revert the console to the initial stage by calling it.
+ * Fixed a memory-leak on Drivers/WindowsDriver class by destroying the generated screen buffers at library shutdown by calling CloseHandle.
+ * Minor change to Core.cs::Application.Init(Func) for better initialization status tracking, via backend property instead of relying on the Top field.
+ * Moved `ListView.ListWrapper` out of `ListView` migueldeicaza/gui.cs#313` (#315)
+ * Resizing the MessageBox width to accommodate all message text (#299)
+ * Timefield format with bounds values (#303)
+ * Implemented lower and upper bounds to TimeField
+ * Passing old text to the Changed event handler
+ * Extract methods on ListView to make it controlable from other controls
-0.70: Bug fixes (320, 321, 306, 304, 291, 299, 303); Surface ListView.ListWrapper, surface various internal methods for use in ListView; Allow list item selection; ; 0.65: Added new TimeField from Jörg Preiß; Fixes for Backtab by Martin Björkström; ListView now supports simple selection; Bug fixes by giladlevi, Daniel Cazzulino and Marius Ungureanu; New Application.Run of T entry point by Daniel Cazzulino; Added various View methods to bring forward, backwards and move views in the hierarchy; Switch to Portable PDBs by Daniel Cazzulino; Dims can now be compared by Daniel Cazzulino; OnMenuOpen handler by giladlevi; Various memory usage optimizations by giladlevi; FileDialog.FilePath is now a full path by Yanwei Wang; ISupportInitialize/ISupportInitializeNotification is now supported thanks to the work from Daniel Cazzulino; Support for non-modal TopLevels by Daniel Cazzulino and Adrian Alonso; 0.24: the Windows driver implements WakeUp, allowing some scenarios like bug #207 to be fixed;
-0.23: Better support for disabled menu items; Raises text changed event after the internals have been updated; Fix Caps-NumLock; Alt-HotKey now work on menus
-0.22: Correct vertical scrollview behavior, Small curses driver fix for terminals without mouse support, TextView support for scrolling, Surface Used property on TextField, Surface Cursor on RadioGroup.
+ 0.70: Bug fixes (320, 321, 306, 304, 291, 299, 303); Surface ListView.ListWrapper, surface various internal methods for use in ListView; Allow list item selection; ; 0.65: Added new TimeField from Jörg Preiß; Fixes for Backtab by Martin Björkström; ListView now supports simple selection; Bug fixes by giladlevi, Daniel Cazzulino and Marius Ungureanu; New Application.Run of T entry point by Daniel Cazzulino; Added various View methods to bring forward, backwards and move views in the hierarchy; Switch to Portable PDBs by Daniel Cazzulino; Dims can now be compared by Daniel Cazzulino; OnMenuOpen handler by giladlevi; Various memory usage optimizations by giladlevi; FileDialog.FilePath is now a full path by Yanwei Wang; ISupportInitialize/ISupportInitializeNotification is now supported thanks to the work from Daniel Cazzulino; Support for non-modal TopLevels by Daniel Cazzulino and Adrian Alonso; 0.24: the Windows driver implements WakeUp, allowing some scenarios like bug #207 to be fixed;
+ 0.23: Better support for disabled menu items; Raises text changed event after the internals have been updated; Fix Caps-NumLock; Alt-HotKey now work on menus
+ 0.22: Correct vertical scrollview behavior, Small curses driver fix for terminals without mouse support, TextView support for scrolling, Surface Used property on TextField, Surface Cursor on RadioGroup.
-0.21: Introudce Attribute.Make to more easily create attributes, and fix a bug in the file panel.
-0.20: Expose some of the CursesDriver APIs
-0.19: PageUpDown updates (GaikwadPratik); Fixes in multi-line labels (hlfrye@gmail.com); Support Delete char in TextView (Greg Amidon); Prevent empty TextViews from crashing; Allow TextFields to be updated on the Changed event.
-0.18: Fixes hotkeys for menus (Sang Kil); Fixes RemoveAll for all containers; Allows Toplevels with no views; Fixes FileDialog layout; Prevent crash in TextView
-0.17: Unix, dynamically load ncurses library to support different configurations, and not require -dev on Linux, various bug fixes.
+ 0.21: Introudce Attribute.Make to more easily create attributes, and fix a bug in the file panel.
+ 0.20: Expose some of the CursesDriver APIs
+ 0.19: PageUpDown updates (GaikwadPratik); Fixes in multi-line labels (hlfrye@gmail.com); Support Delete char in TextView (Greg Amidon); Prevent empty TextViews from crashing; Allow TextFields to be updated on the Changed event.
+ 0.18: Fixes hotkeys for menus (Sang Kil); Fixes RemoveAll for all containers; Allows Toplevels with no views; Fixes FileDialog layout; Prevent crash in TextView
+ 0.17: Unix, dynamically load ncurses library to support different configurations, and not require -dev on Linux, various bug fixes.
-0.16: Support for Shift-Tab on Windows (fix by @mholo65)
+ 0.16: Support for Shift-Tab on Windows (fix by @mholo65)
-0.15: WindowsDriver fix for Legacy Console keyboard input (issue #105)
+ 0.15: WindowsDriver fix for Legacy Console keyboard input (issue #105)
-0.14: WindowsDriver fix for EventType size.
+ 0.14: WindowsDriver fix for EventType size.
-0.13: Fixes keyboard input for Alt-Gr and numbers.
+ 0.13: Fixes keyboard input for Alt-Gr and numbers.
-0.12: Fixes the text editor merge line command.
+ 0.12: Fixes the text editor merge line command.
-0.11: Simplify TextField implementation, fixes a couple of editing bugs.
+ 0.11: Simplify TextField implementation, fixes a couple of editing bugs.
-0.10: Fix unicode rendering for TextField, and bring F# example
+ 0.10: Fix unicode rendering for TextField, and bring F# example
-0.9: File Open/File Save dialogs, HexView, Windows Driver allows resizing, mouse events, faster (thanks to Nick Van Dyck, nickvdyck for the contribution!), smaller bug fixes,
+ 0.9: File Open/File Save dialogs, HexView, Windows Driver allows resizing, mouse events, faster (thanks to Nick Van Dyck, nickvdyck for the contribution!), smaller bug fixes,
-0.8: Completes keyboard support on Windows; Fixes delete on Windows, some layout fixes.
-0.7: terminal resizing on Linux propagates sizes with new layout system, and new features on the layout system (documented)
-0.6: new layout system, multi-line textview editor, Linux bug fix for .NET Core
-0.5: support Linux with .NET Core, Windows driver fixes.
-0.4: hotkey handling fix for RadioButtons
-0.3: Fix Windows key input to not echo characters on console, proper Fkey mapping
-0.2: Auto-detect the best console
+ 0.8: Completes keyboard support on Windows; Fixes delete on Windows, some layout fixes.
+ 0.7: terminal resizing on Linux propagates sizes with new layout system, and new features on the layout system (documented)
+ 0.6: new layout system, multi-line textview editor, Linux bug fix for .NET Core
+ 0.5: support Linux with .NET Core, Windows driver fixes.
+ 0.4: hotkey handling fix for RadioButtons
+ 0.3: Fix Windows key input to not echo characters on console, proper Fkey mapping
+ 0.2: Auto-detect the best console
+
diff --git a/Terminal.Gui/Views/Button.cs b/Terminal.Gui/Views/Button.cs
index 7013079dc..eaf56b62f 100644
--- a/Terminal.Gui/Views/Button.cs
+++ b/Terminal.Gui/Views/Button.cs
@@ -55,29 +55,32 @@ namespace Terminal.Gui {
public Action Clicked;
///
- /// Initializes a new instance of based on the given text at position 0,0
+ /// Initializes a new instance of using layout.
///
///
- /// The size of the is computed based on the
- /// text length.
+ /// The width of the is computed based on the
+ /// text length. The height will always be 1.
///
/// The button's text
- /// If set, this makes the button the default button in the current view.
+ ///
+ /// If true, a special decoration is used, and the user pressing the enter key
+ /// in a will implicitly activate this button.
+ ///
public Button (ustring text, bool is_default = false) : base ()
{
CanFocus = true;
Text = text ?? string.Empty;
this.IsDefault = is_default;
int w = SetWidthHeight (text, is_default);
- Frame = new Rect (0, 0, w, 1);
+ Frame = new Rect (Frame.Location, new Size (w, 1));
}
///
- /// Initializes a new instance of at the given coordinates, based on the given text
+ /// Initializes a new instance of using layout, based on the given text
///
///
- /// The size of the is computed based on the
- /// text length.
+ /// The width of the is computed based on the
+ /// text length. The height will always be 1.
///
/// X position where the button will be shown.
/// Y position where the button will be shown.
@@ -85,17 +88,19 @@ namespace Terminal.Gui {
public Button (int x, int y, ustring text) : this (x, y, text, false) { }
///
- /// Initializes a new instance of at the given coordinates, based on the given text, and with the specified value
+ /// Initializes a new instance of using layout, based on the given text.
///
///
- /// If the value for is_default is true, a special
- /// decoration is used, and the enter key on a
- /// dialog would implicitly activate this button.
+ /// The width of the is computed based on the
+ /// text length. The height will always be 1.
///
/// X position where the button will be shown.
/// Y position where the button will be shown.
/// The button's text
- /// If set, this makes the button the default button in the current view, which means that if the user presses return on a view that does not handle return, it will be treated as if he had clicked on the button
+ ///
+ /// If true, a special decoration is used, and the user pressing the enter key
+ /// in a will implicitly activate this button.
+ ///
public Button (int x, int y, ustring text, bool is_default)
: base (new Rect (x, y, text.Length + 4 + (is_default ? 2 : 0), 1))
{
@@ -110,6 +115,7 @@ namespace Terminal.Gui {
int w = text.Length + 4 + (is_default ? 2 : 0);
Width = w;
Height = 1;
+ Frame = new Rect (Frame.Location, new Size (w, 1));
return w;
}
@@ -137,17 +143,27 @@ namespace Terminal.Gui {
else
shown_text = "[ " + text + " ]";
- hot_pos = -1;
hot_key = (Rune)0;
- int i = 0;
- foreach (Rune c in shown_text) {
- if (Rune.IsUpper (c)) {
- hot_key = c;
- hot_pos = i;
- break;
+ hot_pos = shown_text.IndexOf ('_');
+
+ if (hot_pos == -1) {
+ // Use first upper-case char
+ int i = 0;
+ foreach (Rune c in shown_text) {
+ if (Rune.IsUpper (c)) {
+ hot_key = c;
+ hot_pos = i;
+ break;
+ }
+ i++;
}
- i++;
+ } else {
+ // Use char after '_'
+ var start = shown_text [0, hot_pos];
+ shown_text = start + shown_text [hot_pos + 1, shown_text.Length];
+ hot_key = Char.ToUpper((char)shown_text [hot_pos]);
}
+
SetNeedsDisplay ();
}
@@ -214,7 +230,7 @@ namespace Terminal.Gui {
}
///
- public override bool MouseEvent(MouseEvent me)
+ public override bool MouseEvent (MouseEvent me)
{
if (me.Flags == MouseFlags.Button1Clicked) {
SuperView.SetFocus (this);
diff --git a/Terminal.Gui/Views/FrameView.cs b/Terminal.Gui/Views/FrameView.cs
index cd60c1b4f..b2d44bb57 100644
--- a/Terminal.Gui/Views/FrameView.cs
+++ b/Terminal.Gui/Views/FrameView.cs
@@ -140,7 +140,7 @@ namespace Terminal.Gui {
if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
Driver.SetAttribute (ColorScheme.Normal);
- Driver.DrawFrame (scrRect, padding, true);
+ Driver.DrawWindowFrame (scrRect, padding + 1, padding + 1, padding + 1, padding + 1, border: true, fill: true);
}
var savedClip = ClipToBounds ();
@@ -149,7 +149,7 @@ namespace Terminal.Gui {
ClearNeedsDisplay ();
Driver.SetAttribute (ColorScheme.Normal);
- Driver.DrawFrame (scrRect, padding, false);
+ Driver.DrawWindowFrame (scrRect, padding + 1, padding + 1, padding + 1, padding + 1, border: true, fill: false);
if (HasFocus)
Driver.SetAttribute (ColorScheme.HotNormal);
diff --git a/Terminal.Gui/Windows/Dialog.cs b/Terminal.Gui/Windows/Dialog.cs
index 82d696d73..904d73491 100644
--- a/Terminal.Gui/Windows/Dialog.cs
+++ b/Terminal.Gui/Windows/Dialog.cs
@@ -4,15 +4,15 @@
// Authors:
// Miguel de Icaza (miguel@gnome.org)
//
-
using System;
using System.Collections.Generic;
+using System.Linq;
using NStack;
namespace Terminal.Gui {
///
/// The is a that by default is centered and contains one
- /// or more . It defaults to the color scheme and has a 1 cell padding around the edges.
+ /// or more s. It defaults to the color scheme and has a 1 cell padding around the edges.
///
///
/// To run the modally, create the , and pass it to .
@@ -21,21 +21,37 @@ namespace Terminal.Gui {
///
public class Dialog : Window {
List