Browse Source

Shortcut code cleanup

Tig 10 months ago
parent
commit
9dd0be3147
2 changed files with 14 additions and 1 deletions
  1. 13 0
      Terminal.Gui/Views/Bar.cs
  2. 1 1
      Terminal.Gui/Views/Shortcut.cs

+ 13 - 0
Terminal.Gui/Views/Bar.cs

@@ -298,6 +298,19 @@ public class Bar : View, IOrientation, IDesignable
 
 
         Add (shortcut);
         Add (shortcut);
 
 
+        shortcut = new Shortcut
+        {
+            Text = "Czech",
+            CommandView = new CheckBox()
+            {
+                Title = "_Check"
+            },
+            Key = Key.F9,
+            CanFocus = false
+        };
+
+        Add (shortcut);
+
         return true;
         return true;
     }
     }
 }
 }

+ 1 - 1
Terminal.Gui/Views/Shortcut.cs

@@ -94,7 +94,7 @@ public class Shortcut : View, IOrientation, IDesignable
     {
     {
         Id = "_shortcut";
         Id = "_shortcut";
 
 
-        // Disabled for now due to bs in highlight handling and mouse clicks - HighlightStyle = HighlightStyle.Pressed;
+        HighlightStyle = HighlightStyle.None;
         CanFocus = true;
         CanFocus = true;
         Width = GetWidthDimAuto ();
         Width = GetWidthDimAuto ();
         Height = Dim.Auto (DimAutoStyle.Content, 1);
         Height = Dim.Auto (DimAutoStyle.Content, 1);