From e02714ba65186baf3a1514d3af65f7001c7c0188 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Wed, 10 Jan 2018 22:46:54 -0500 Subject: [PATCH] Fix radiogroup rectangle region --- Core.cs | 1 - Views/RadioGroup.cs | 2 +- demo.cs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Core.cs b/Core.cs index b20558d72..f747d55ea 100644 --- a/Core.cs +++ b/Core.cs @@ -996,7 +996,6 @@ namespace Terminal { Y = ry, Flags = me.Flags }; - // Should we bubbled up the event, if it is not handled? view.MouseEvent (nme); } diff --git a/Views/RadioGroup.cs b/Views/RadioGroup.cs index fe41c34fb..088a52465 100644 --- a/Views/RadioGroup.cs +++ b/Views/RadioGroup.cs @@ -25,7 +25,7 @@ namespace Terminal { int width = 0; foreach (var s in radioLabels) - width = Math.Max (radioLabels.Length + 4, width); + width = Math.Max (s.Length + 4, width); return new Rect (x, y, width, radioLabels.Length); } /// diff --git a/demo.cs b/demo.cs index 749bb32d6..89e4eabae 100644 --- a/demo.cs +++ b/demo.cs @@ -57,7 +57,7 @@ class Demo { int count = 0; ml = new Label (new Rect (3, 16, 50, 1), "Mouse: "); Application.RootMouseEvent += delegate (MouseEvent me) { - + ml.Text = $"Mouse: ({me.X},{me.Y}) - {me.Flags} {count++}"; };