BDisp 8 місяців тому
батько
коміт
aa2f3f8461

+ 3 - 3
Terminal.Gui/Views/TabView/TabRowView.cs → Terminal.Gui/Views/TabView/TabRow.cs

@@ -1,16 +1,16 @@
 #nullable enable
 namespace Terminal.Gui;
 
-internal class TabRowView : View
+internal class TabRow : View
 {
     private readonly TabView _host;
     private readonly View _leftScrollIndicator;
     private readonly View _rightScrollIndicator;
 
-    public TabRowView (TabView host)
+    public TabRow (TabView host)
     {
         _host = host;
-        Id = "tabRowView";
+        Id = "tabRow";
 
         CanFocus = true;
         TabStop = TabBehavior.TabGroup;

+ 2 - 2
Terminal.Gui/Views/TabView/TabView.cs

@@ -16,7 +16,7 @@ public class TabView : View
     private readonly List<Tab> _tabs = new ();
 
     /// <summary>This sub view is the 2 or 3 line control that represents the actual tabs themselves.</summary>
-    private readonly TabRowView _tabsBar;
+    private readonly TabRow _tabsBar;
 
     private Tab? _selectedTab;
 
@@ -28,7 +28,7 @@ public class TabView : View
     {
         CanFocus = true;
         TabStop = TabBehavior.TabStop; // Because TabView has focusable subviews, it must be a TabGroup
-        _tabsBar = new TabRowView (this);
+        _tabsBar = new TabRow (this);
         _containerView = new ();
         ApplyStyleChanges ();
 

+ 6 - 6
UnitTests/Views/TabViewTests.cs

@@ -101,7 +101,7 @@ public class TabViewTests (ITestOutputHelper output)
         tv.Draw ();
 
         View tabRow = tv.Subviews [0];
-        Assert.Equal ("TabRowView", tabRow.GetType ().Name);
+        Assert.Equal ("TabRow", tabRow.GetType ().Name);
 
         TestHelpers.AssertDriverContentsAre (
                                              @"
@@ -184,7 +184,7 @@ public class TabViewTests (ITestOutputHelper output)
         tv.Draw ();
 
         View tabRow = tv.Subviews [0];
-        Assert.Equal ("TabRowView", tabRow.GetType ().Name);
+        Assert.Equal ("TabRow", tabRow.GetType ().Name);
 
         TestHelpers.AssertDriverContentsAre (
                                              @"
@@ -272,7 +272,7 @@ public class TabViewTests (ITestOutputHelper output)
         tv.Draw ();
 
         View tabRow = tv.Subviews [0];
-        Assert.Equal ("TabRowView", tabRow.GetType ().Name);
+        Assert.Equal ("TabRow", tabRow.GetType ().Name);
 
         TestHelpers.AssertDriverContentsAre (
                                              @"
@@ -433,7 +433,7 @@ public class TabViewTests (ITestOutputHelper output)
         Assert.Equal (btnSubView, top.MostFocused);
 
         Assert.True (Application.RaiseKeyDownEvent (Key.CursorUp));
-        // TabRowView now has TabGroup which only F6 is allowed
+        // TabRow now has TabGroup which only F6 is allowed
         Assert.NotEqual (tab2, top.MostFocused);
         Assert.Equal (btn, top.MostFocused);
 
@@ -660,7 +660,7 @@ public class TabViewTests (ITestOutputHelper output)
                                                      );
 
         tv.SelectedTab = tab2;
-        Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRowView")).MostFocused);
+        Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRow")).MostFocused);
 
         tv.Layout ();
         View.SetClipToScreen ();
@@ -806,7 +806,7 @@ public class TabViewTests (ITestOutputHelper output)
                                                      );
 
         tv.SelectedTab = tab2;
-        Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRowView")).MostFocused);
+        Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRow")).MostFocused);
 
         tv.Layout ();
         View.SetClipToScreen ();