Browse Source

Add a frame to buttons, as this calculation is used elsewhere, still missing - focus on the dialogs

miguel 7 years ago
parent
commit
9bd619c74f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Terminal.Gui/Views/Button.cs

+ 3 - 1
Terminal.Gui/Views/Button.cs

@@ -66,8 +66,10 @@ namespace Terminal.Gui {
 		public Button (ustring text, bool is_default = false) : base ()
 		{
 			Text = text;
-			Width = text.Length + 4 + (is_default ? 2 : 0);
+			int w = text.Length + 4 + (is_default ? 2 : 0);
+			Width = w;
 			Height = 1;
+			Frame = new Rect (0, 0, w, 1);
 		}
 
 		/// <summary>