瀏覽代碼

Made RadioGroup utilize InvertColorsOnPress.

Works, but not optimally. The entire view invert. What would be really nice is if just the radio item under the mouse inverted. We can fix this later.
Tig 1 年之前
父節點
當前提交
d9d5f860c3
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Terminal.Gui/Views/RadioGroup.cs

+ 3 - 0
Terminal.Gui/Views/RadioGroup.cs

@@ -76,6 +76,8 @@ public class RadioGroup : View
         KeyBindings.Add (Key.Space, Command.Accept);
 
         LayoutStarted += RadioGroup_LayoutStarted;
+
+        InvertColorsOnPress = true;
     }
 
     /// <summary>
@@ -163,6 +165,7 @@ public class RadioGroup : View
     /// <inheritdoc/>
     protected internal override bool OnMouseEvent  (MouseEvent me)
     {
+        base.OnMouseEvent (me);
         if (!me.Flags.HasFlag (MouseFlags.Button1Clicked))
         {
             return false;