Tig 1 year ago
parent
commit
72e38a9825
3 changed files with 17 additions and 18 deletions
  1. 3 3
      Terminal.Gui/Views/Shortcut.cs
  2. 10 11
      UICatalog/Scenarios/Bars.cs
  3. 4 4
      UICatalog/UICatalog.cs

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

@@ -634,7 +634,7 @@ public class Shortcut : View
 
                 break;
             case KeyBindingScope.HotKey:
-                _commandView.InvokeCommand (Command.HotKey);
+                CommandView.InvokeCommand (Command.HotKey);
                 handled = false;
 
                 break;
@@ -648,10 +648,10 @@ public class Shortcut : View
 
                 if (CanFocus)
                 {
-                    SetFocus ();
+                    CommandView.SetFocus ();
                 }
 
-                return false;
+                return true;
             }
         }
 

+ 10 - 11
UICatalog/Scenarios/Bars.cs

@@ -151,16 +151,16 @@ public class Bars : Scenario
             Y = Pos.AnchorEnd () - 6
         };
         statusBarLikeExamples.Add (label);
-        //bar = new Bar
-        //{
-        //    Id = "statusBar-like",
-        //    X = Pos.Right (label),
-        //    Y = Pos.Top (label),
-        //    Width = Dim.Fill (),
-        //    Orientation = Orientation.Horizontal,
-        //};
-        //ConfigStatusBar (bar);
-        //statusBarLikeExamples.Add (bar);
+        bar = new Bar
+        {
+            Id = "statusBar-like",
+            X = Pos.Right (label),
+            Y = Pos.Top (label),
+            Width = Dim.Fill (),
+            Orientation = Orientation.Horizontal,
+        };
+        ConfigStatusBar (bar);
+        statusBarLikeExamples.Add (bar);
 
         label = new Label ()
         {
@@ -175,7 +175,6 @@ public class Bars : Scenario
             X = Pos.Right (label),
             Y = Pos.Top (label),
             Width = Dim.Fill (),
-            Orientation = Orientation.Horizontal,
         };
         ConfigStatusBar (bar);
         statusBarLikeExamples.Add (bar);

+ 4 - 4
UICatalog/UICatalog.cs

@@ -447,10 +447,10 @@ internal class UICatalogApp
                 ]
             };
 
-            //StatusBar = new ()
-            //{
-            //    Visible = ShowStatusBar,
-            //};
+            StatusBar = new ()
+            {
+                Visible = ShowStatusBar,
+            };
 
             if (StatusBar is { })
             {