Browse Source

Refactored RadioGroup to just use Commands

Tig 7 months ago
parent
commit
ea74179833
1 changed files with 2 additions and 12 deletions
  1. 2 12
      Terminal.Gui/Views/RadioGroup.cs

+ 2 - 12
Terminal.Gui/Views/RadioGroup.cs

@@ -36,8 +36,6 @@ public class RadioGroup : View, IDesignable, IOrientation
         // ReSharper disable once UseObjectOrCollectionInitializer
         _orientationHelper = new (this);
         _orientationHelper.Orientation = Orientation.Vertical;
-        _orientationHelper.OrientationChanging += (sender, e) => OrientationChanging?.Invoke (this, e);
-        _orientationHelper.OrientationChanged += (sender, e) => OrientationChanged?.Invoke (this, e);
 
         SetupKeyBindings ();
 
@@ -353,11 +351,7 @@ public class RadioGroup : View, IDesignable, IOrientation
 
                     if (j == hotPos && i == Cursor)
                     {
-                        SetAttribute (
-                                                          HasFocus
-                                                              ? ColorScheme!.HotFocus
-                                                              : GetHotNormalColor ()
-                                                         );
+                        SetAttribute (HasFocus ? GetHotFocusColor() : GetHotNormalColor ());
                     }
                     else if (j == hotPos && i != Cursor)
                     {
@@ -375,11 +369,7 @@ public class RadioGroup : View, IDesignable, IOrientation
 
                         if (i == Cursor)
                         {
-                            SetAttribute (
-                                                              HasFocus
-                                                                  ? ColorScheme!.HotFocus
-                                                                  : GetHotNormalColor ()
-                                                             );
+                            SetAttribute (HasFocus ? GetHotFocusColor() : GetHotNormalColor ());
                         }
                         else if (i != Cursor)
                         {