mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-28 16:58:01 +01:00
Rename to TabRow.
This commit is contained in:
@@ -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;
|
||||
@@ -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 ();
|
||||
|
||||
|
||||
@@ -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 ();
|
||||
|
||||
Reference in New Issue
Block a user