Skip to content

Commit aa2f3f8

Browse files
committed
Rename to TabRow.
1 parent 1d91f1b commit aa2f3f8

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Terminal.Gui/Views/TabView/TabRowView.cs renamed to Terminal.Gui/Views/TabView/TabRow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#nullable enable
22
namespace Terminal.Gui;
33

4-
internal class TabRowView : View
4+
internal class TabRow : View
55
{
66
private readonly TabView _host;
77
private readonly View _leftScrollIndicator;
88
private readonly View _rightScrollIndicator;
99

10-
public TabRowView (TabView host)
10+
public TabRow (TabView host)
1111
{
1212
_host = host;
13-
Id = "tabRowView";
13+
Id = "tabRow";
1414

1515
CanFocus = true;
1616
TabStop = TabBehavior.TabGroup;

Terminal.Gui/Views/TabView/TabView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class TabView : View
1616
private readonly List<Tab> _tabs = new ();
1717

1818
/// <summary>This sub view is the 2 or 3 line control that represents the actual tabs themselves.</summary>
19-
private readonly TabRowView _tabsBar;
19+
private readonly TabRow _tabsBar;
2020

2121
private Tab? _selectedTab;
2222

@@ -28,7 +28,7 @@ public TabView ()
2828
{
2929
CanFocus = true;
3030
TabStop = TabBehavior.TabStop; // Because TabView has focusable subviews, it must be a TabGroup
31-
_tabsBar = new TabRowView (this);
31+
_tabsBar = new TabRow (this);
3232
_containerView = new ();
3333
ApplyStyleChanges ();
3434

UnitTests/Views/TabViewTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void MouseClick_ChangesTab ()
101101
tv.Draw ();
102102

103103
View tabRow = tv.Subviews [0];
104-
Assert.Equal ("TabRowView", tabRow.GetType ().Name);
104+
Assert.Equal ("TabRow", tabRow.GetType ().Name);
105105

106106
TestHelpers.AssertDriverContentsAre (
107107
@"
@@ -184,7 +184,7 @@ public void MouseClick_Right_Left_Arrows_ChangesTab ()
184184
tv.Draw ();
185185

186186
View tabRow = tv.Subviews [0];
187-
Assert.Equal ("TabRowView", tabRow.GetType ().Name);
187+
Assert.Equal ("TabRow", tabRow.GetType ().Name);
188188

189189
TestHelpers.AssertDriverContentsAre (
190190
@"
@@ -272,7 +272,7 @@ public void MouseClick_Right_Left_Arrows_ChangesTab_With_Border ()
272272
tv.Draw ();
273273

274274
View tabRow = tv.Subviews [0];
275-
Assert.Equal ("TabRowView", tabRow.GetType ().Name);
275+
Assert.Equal ("TabRow", tabRow.GetType ().Name);
276276

277277
TestHelpers.AssertDriverContentsAre (
278278
@"
@@ -433,7 +433,7 @@ public void ProcessKey_Down_Up_Right_Left_Home_End_PageDown_PageUp_F6 ()
433433
Assert.Equal (btnSubView, top.MostFocused);
434434

435435
Assert.True (Application.RaiseKeyDownEvent (Key.CursorUp));
436-
// TabRowView now has TabGroup which only F6 is allowed
436+
// TabRow now has TabGroup which only F6 is allowed
437437
Assert.NotEqual (tab2, top.MostFocused);
438438
Assert.Equal (btn, top.MostFocused);
439439

@@ -660,7 +660,7 @@ public void ShowTopLine_False_TabsOnBottom_False_TestThinTabView_WithLongNames (
660660
);
661661

662662
tv.SelectedTab = tab2;
663-
Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRowView")).MostFocused);
663+
Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRow")).MostFocused);
664664

665665
tv.Layout ();
666666
View.SetClipToScreen ();
@@ -806,7 +806,7 @@ public void ShowTopLine_False_TabsOnBottom_True_TestThinTabView_WithLongNames ()
806806
);
807807

808808
tv.SelectedTab = tab2;
809-
Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRowView")).MostFocused);
809+
Assert.Equal (tab2, tv.Subviews.First (v => v.Id.Contains ("tabRow")).MostFocused);
810810

811811
tv.Layout ();
812812
View.SetClipToScreen ();

0 commit comments

Comments
 (0)