2
0
Эх сурвалжийг харах

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

miguel 7 жил өмнө
parent
commit
9bd619c74f

+ 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>