From bcc1168182f9426b19734f1496e41bb156ee38c5 Mon Sep 17 00:00:00 2001 From: BDisp Date: Sun, 27 Oct 2024 10:58:56 +0000 Subject: [PATCH] Fix typo. --- Terminal.Gui/View/View.Navigation.cs | 14 +++++++------- Terminal.Gui/Views/ComboBox.cs | 2 +- Terminal.Gui/Views/TabView.cs | 6 +++--- UICatalog/Scenarios/ASCIICustomButton.cs | 2 +- UnitTests/Views/ScrollViewTests.cs | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Terminal.Gui/View/View.Navigation.cs b/Terminal.Gui/View/View.Navigation.cs index e68b3c7d3..094ed5a01 100644 --- a/Terminal.Gui/View/View.Navigation.cs +++ b/Terminal.Gui/View/View.Navigation.cs @@ -850,18 +850,18 @@ public partial class View // Focus and cross-view navigation management (TabStop SetNeedsDisplay (); } - private void RaiseFocusChanged (bool newHasFocus, View? previousFocusedView, View? focusedVew) + private void RaiseFocusChanged (bool newHasFocus, View? previousFocusedView, View? focusedView) { - if (newHasFocus && focusedVew?.Focused is null) + if (newHasFocus && focusedView?.Focused is null) { - Application.Navigation?.SetFocused (focusedVew); + Application.Navigation?.SetFocused (focusedView); } // Call the virtual method - OnHasFocusChanged (newHasFocus, previousFocusedView, focusedVew); + OnHasFocusChanged (newHasFocus, previousFocusedView, focusedView); // Raise the event - var args = new HasFocusEventArgs (newHasFocus, newHasFocus, previousFocusedView, focusedVew); + var args = new HasFocusEventArgs (newHasFocus, newHasFocus, previousFocusedView, focusedView); HasFocusChanged?.Invoke (this, args); } @@ -876,8 +876,8 @@ public partial class View // Focus and cross-view navigation management (TabStop /// /// The new value of . /// - /// The view that is now focused. May be - protected virtual void OnHasFocusChanged (bool newHasFocus, View? previousFocusedView, View? focusedVew) { } + /// The view that is now focused. May be + protected virtual void OnHasFocusChanged (bool newHasFocus, View? previousFocusedView, View? focusedView) { } /// Raised after has changed. /// diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index fbaaf4b23..9005a7ecd 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -962,7 +962,7 @@ public class ComboBox : View, IDesignable return true; } - protected override void OnHasFocusChanged (bool newHasFocus, [CanBeNull] View previousFocusedView, [CanBeNull] View focusedVew) + protected override void OnHasFocusChanged (bool newHasFocus, [CanBeNull] View previousFocusedView, [CanBeNull] View focusedView) { if (newHasFocus) { diff --git a/Terminal.Gui/Views/TabView.cs b/Terminal.Gui/Views/TabView.cs index 28764bf4e..97e9fe2ad 100644 --- a/Terminal.Gui/Views/TabView.cs +++ b/Terminal.Gui/Views/TabView.cs @@ -297,16 +297,16 @@ public class TabView : View public int EnsureValidScrollOffsets (int value) { return Math.Max (Math.Min (value, Tabs.Count - 1), 0); } /// - protected override void OnHasFocusChanged (bool newHasFocus, View previousFocusedView, View focusedVew) + protected override void OnHasFocusChanged (bool newHasFocus, View previousFocusedView, View focusedView) { - if (SelectedTab is { } && !_contentView.CanFocus && focusedVew == this) + if (SelectedTab is { } && !_contentView.CanFocus && focusedView == this) { SelectedTab?.SetFocus (); return; } - base.OnHasFocusChanged (newHasFocus, previousFocusedView, focusedVew); + base.OnHasFocusChanged (newHasFocus, previousFocusedView, focusedView); } /// diff --git a/UICatalog/Scenarios/ASCIICustomButton.cs b/UICatalog/Scenarios/ASCIICustomButton.cs index 45889f3e8..d7e181eae 100644 --- a/UICatalog/Scenarios/ASCIICustomButton.cs +++ b/UICatalog/Scenarios/ASCIICustomButton.cs @@ -111,7 +111,7 @@ public class ASCIICustomButtonTest : Scenario Add (_border, _fill, title); } - protected override void OnHasFocusChanged (bool newHasFocus, [CanBeNull] View previousFocusedView, [CanBeNull] View focusedVew) + protected override void OnHasFocusChanged (bool newHasFocus, [CanBeNull] View previousFocusedView, [CanBeNull] View focusedView) { if (newHasFocus) { diff --git a/UnitTests/Views/ScrollViewTests.cs b/UnitTests/Views/ScrollViewTests.cs index 325a09d34..6122f0e64 100644 --- a/UnitTests/Views/ScrollViewTests.cs +++ b/UnitTests/Views/ScrollViewTests.cs @@ -1134,7 +1134,7 @@ public class ScrollViewTests (ITestOutputHelper output) CanFocus = true; } - protected override void OnHasFocusChanged (bool newHasFocus, [CanBeNull] View previousFocusedView, [CanBeNull] View focusedVew) + protected override void OnHasFocusChanged (bool newHasFocus, [CanBeNull] View previousFocusedView, [CanBeNull] View focusedView) { if (newHasFocus) {