diff --git a/Terminal.Gui/Views/TabView/TabRowView.cs b/Terminal.Gui/Views/TabView/TabRow.cs similarity index 99% rename from Terminal.Gui/Views/TabView/TabRowView.cs rename to Terminal.Gui/Views/TabView/TabRow.cs index 36ffe303d..2ca80a69a 100644 --- a/Terminal.Gui/Views/TabView/TabRowView.cs +++ b/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; diff --git a/Terminal.Gui/Views/TabView/TabView.cs b/Terminal.Gui/Views/TabView/TabView.cs index 68264f2a3..73f286b56 100644 --- a/Terminal.Gui/Views/TabView/TabView.cs +++ b/Terminal.Gui/Views/TabView/TabView.cs @@ -16,7 +16,7 @@ public class TabView : View private readonly List _tabs = new (); /// This sub view is the 2 or 3 line control that represents the actual tabs themselves. - 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 (); diff --git a/UnitTests/Views/TabViewTests.cs b/UnitTests/Views/TabViewTests.cs index 49590a06f..ac12a5556 100644 --- a/UnitTests/Views/TabViewTests.cs +++ b/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 ();