mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Refactored RadioGroup to just use Commands
This commit is contained in:
@@ -36,8 +36,6 @@ public class RadioGroup : View, IDesignable, IOrientation
|
|||||||
// ReSharper disable once UseObjectOrCollectionInitializer
|
// ReSharper disable once UseObjectOrCollectionInitializer
|
||||||
_orientationHelper = new (this);
|
_orientationHelper = new (this);
|
||||||
_orientationHelper.Orientation = Orientation.Vertical;
|
_orientationHelper.Orientation = Orientation.Vertical;
|
||||||
_orientationHelper.OrientationChanging += (sender, e) => OrientationChanging?.Invoke (this, e);
|
|
||||||
_orientationHelper.OrientationChanged += (sender, e) => OrientationChanged?.Invoke (this, e);
|
|
||||||
|
|
||||||
SetupKeyBindings ();
|
SetupKeyBindings ();
|
||||||
|
|
||||||
@@ -353,11 +351,7 @@ public class RadioGroup : View, IDesignable, IOrientation
|
|||||||
|
|
||||||
if (j == hotPos && i == Cursor)
|
if (j == hotPos && i == Cursor)
|
||||||
{
|
{
|
||||||
SetAttribute (
|
SetAttribute (HasFocus ? GetHotFocusColor() : GetHotNormalColor ());
|
||||||
HasFocus
|
|
||||||
? ColorScheme!.HotFocus
|
|
||||||
: GetHotNormalColor ()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else if (j == hotPos && i != Cursor)
|
else if (j == hotPos && i != Cursor)
|
||||||
{
|
{
|
||||||
@@ -375,11 +369,7 @@ public class RadioGroup : View, IDesignable, IOrientation
|
|||||||
|
|
||||||
if (i == Cursor)
|
if (i == Cursor)
|
||||||
{
|
{
|
||||||
SetAttribute (
|
SetAttribute (HasFocus ? GetHotFocusColor() : GetHotNormalColor ());
|
||||||
HasFocus
|
|
||||||
? ColorScheme!.HotFocus
|
|
||||||
: GetHotNormalColor ()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else if (i != Cursor)
|
else if (i != Cursor)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user