Skip to content

Commit ea74179

Browse files
committed
Refactored RadioGroup to just use Commands
1 parent 97d4c0a commit ea74179

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Terminal.Gui/Views/RadioGroup.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public RadioGroup ()
3636
// ReSharper disable once UseObjectOrCollectionInitializer
3737
_orientationHelper = new (this);
3838
_orientationHelper.Orientation = Orientation.Vertical;
39-
_orientationHelper.OrientationChanging += (sender, e) => OrientationChanging?.Invoke (this, e);
40-
_orientationHelper.OrientationChanged += (sender, e) => OrientationChanged?.Invoke (this, e);
4139

4240
SetupKeyBindings ();
4341

@@ -353,11 +351,7 @@ protected override bool OnDrawingContent ()
353351

354352
if (j == hotPos && i == Cursor)
355353
{
356-
SetAttribute (
357-
HasFocus
358-
? ColorScheme!.HotFocus
359-
: GetHotNormalColor ()
360-
);
354+
SetAttribute (HasFocus ? GetHotFocusColor() : GetHotNormalColor ());
361355
}
362356
else if (j == hotPos && i != Cursor)
363357
{
@@ -375,11 +369,7 @@ protected override bool OnDrawingContent ()
375369

376370
if (i == Cursor)
377371
{
378-
SetAttribute (
379-
HasFocus
380-
? ColorScheme!.HotFocus
381-
: GetHotNormalColor ()
382-
);
372+
SetAttribute (HasFocus ? GetHotFocusColor() : GetHotNormalColor ());
383373
}
384374
else if (i != Cursor)
385375
{

0 commit comments

Comments
 (0)