2
0
Эх сурвалжийг харах

Debugging GraphView issue

Tig 11 сар өмнө
parent
commit
ad81e09d42

+ 2 - 6
Terminal.Gui/Views/FileDialog.cs

@@ -508,11 +508,7 @@ public class FileDialog : Dialog
             };
             };
             AllowedTypeMenuClicked (0);
             AllowedTypeMenuClicked (0);
 
 
-            _allowedTypeMenuBar.HasFocusChanging += (s, e) =>
-                                                    {
-                                                        _allowedTypeMenuBar.OpenMenu (0);
-                                                    };
-
+            // TODO: Using v1's menu bar here is a hack. Need to upgrade this.
             _allowedTypeMenuBar.DrawContentComplete += (s, e) =>
             _allowedTypeMenuBar.DrawContentComplete += (s, e) =>
                                                        {
                                                        {
                                                            _allowedTypeMenuBar.Move (e.NewViewport.Width - 1, 0);
                                                            _allowedTypeMenuBar.Move (e.NewViewport.Width - 1, 0);
@@ -531,7 +527,7 @@ public class FileDialog : Dialog
         // to streamline user experience and allow direct typing of paths
         // to streamline user experience and allow direct typing of paths
         // with zero navigation we start with focus in the text box and any
         // with zero navigation we start with focus in the text box and any
         // default/current path fully selected and ready to be overwritten
         // default/current path fully selected and ready to be overwritten
-        _tbPath.FocusDeepest (NavigationDirection.Forward, null);
+        _tbPath.SetFocus ();
         _tbPath.SelectAll ();
         _tbPath.SelectAll ();
 
 
         if (string.IsNullOrEmpty (Title))
         if (string.IsNullOrEmpty (Title))

+ 3 - 3
UICatalog/Scenarios/GraphViewExample.cs

@@ -161,7 +161,7 @@ public class GraphViewExample : Scenario
         };
         };
 
 
         frameRight.Add (
         frameRight.Add (
-                        _about = new() { Width = Dim.Fill (), Height = Dim.Fill () }
+                        _about = new() { Width = Dim.Fill (), Height = Dim.Fill (), ReadOnly = true }
                        );
                        );
 
 
         app.Add (frameRight);
         app.Add (frameRight);
@@ -170,8 +170,8 @@ public class GraphViewExample : Scenario
                                        new Shortcut []
                                        new Shortcut []
                                        {
                                        {
                                            new (Key.G.WithCtrl, "Next Graph", () => _graphs [_currentGraph++ % _graphs.Length] ()),
                                            new (Key.G.WithCtrl, "Next Graph", () => _graphs [_currentGraph++ % _graphs.Length] ()),
-                                           new (Key.CursorUp, "Zoom In", () => Zoom (0.5f)),
-                                           new (Key.CursorDown, "Zoom Out", () => Zoom (2f))
+                                           new (Key.PageUp, "Zoom In", () => Zoom (0.5f)),
+                                           new (Key.PageDown, "Zoom Out", () => Zoom (2f))
                                        }
                                        }
                                       );
                                       );
         app.Add (statusBar);
         app.Add (statusBar);