mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 09:18:01 +01:00
Merge branch 'v2_develop' into v2_2489_scroll-scrollbar-new
This commit is contained in:
@@ -110,6 +110,7 @@ public static class ConfigurationManager
|
||||
TypeInfoResolver = SourceGenerationContext.Default
|
||||
};
|
||||
|
||||
[SuppressMessage ("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
|
||||
internal static readonly SourceGenerationContext _serializerContext = new (_serializerOptions);
|
||||
|
||||
[SuppressMessage ("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
|
||||
|
||||
@@ -141,4 +141,4 @@
|
||||
<EnableSourceLink>true</EnableSourceLink>
|
||||
<Authors>Miguel de Icaza, Tig Kindel (@tig), @BDisp</Authors>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -49,7 +49,7 @@ using System.Numerics;
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>
|
||||
/// <see cref="Dim.Fill(int)"/>
|
||||
/// <see cref="Dim.Fill(Dim)"/>
|
||||
/// </term>
|
||||
/// <description>
|
||||
/// Creates a <see cref="Dim"/> object that fills the dimension from the View's X position
|
||||
|
||||
@@ -333,7 +333,7 @@ public abstract record Pos
|
||||
/// <summary>
|
||||
/// Indicates whether the specified type <typeparamref name="T"/> is in the hierarchy of this Pos object.
|
||||
/// </summary>
|
||||
/// <param name="pos">A reference to this <see cref="Pos}"/> instance.</param>
|
||||
/// <param name="pos">A reference to this <see cref="Pos"/> instance.</param>
|
||||
/// <returns></returns>
|
||||
public bool Has<T> (out Pos pos) where T : Pos
|
||||
{
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#nullable enable
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Terminal.Gui;
|
||||
|
||||
public partial class View // SuperView/SubView hierarchy management (SuperView, SubViews, Add, Remove, etc.)
|
||||
{
|
||||
[SuppressMessage ("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
|
||||
private static readonly IList<View> _empty = new List<View> (0).AsReadOnly ();
|
||||
|
||||
private List<View>? _subviews; // This is null, and allocated on demand.
|
||||
|
||||
@@ -451,7 +451,7 @@ public partial class View // Layout APIs
|
||||
/// .
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If set to a relative value (e.g. <see cref="Dim.Fill(int)"/>) the value is indeterminate until the view has
|
||||
/// If set to a relative value (e.g. <see cref="Dim.Fill(Dim)"/>) the value is indeterminate until the view has
|
||||
/// been initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout"/> has been
|
||||
/// called.
|
||||
/// </para>
|
||||
@@ -500,7 +500,7 @@ public partial class View // Layout APIs
|
||||
/// .
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// If set to a relative value (e.g. <see cref="Dim.Fill(int)"/>) the value is indeterminate until the view has
|
||||
/// If set to a relative value (e.g. <see cref="Dim.Fill(Dim)"/>) the value is indeterminate until the view has
|
||||
/// been initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout"/> has been
|
||||
/// called.
|
||||
/// </para>
|
||||
|
||||
@@ -154,7 +154,7 @@ public class ColorPicker : View
|
||||
_tfName.Autocomplete = auto;
|
||||
|
||||
_tfName.HasFocusChanged += UpdateValueFromName;
|
||||
_tfName.Accept += (_s, _) => UpdateValueFromName ();
|
||||
_tfName.Accept += (s, _) => UpdateValueFromName ();
|
||||
}
|
||||
|
||||
private void CreateTextField ()
|
||||
@@ -303,7 +303,7 @@ public class ColorPicker : View
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateValueFromName (object sender, HasFocusEventArgs e)
|
||||
private void UpdateValueFromName (object? sender, HasFocusEventArgs e)
|
||||
{
|
||||
// if the new value of Focused is true then it is an enter event so ignore
|
||||
if (e.NewValue)
|
||||
|
||||
@@ -24,7 +24,7 @@ public partial class Toplevel : View
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Toplevel"/> class,
|
||||
/// defaulting to full screen. The <see cref="View.Width"/> and <see cref="View.Height"/> properties will be set to the
|
||||
/// dimensions of the terminal using <see cref="Dim.Fill"/>.
|
||||
/// dimensions of the terminal using <see cref="Dim.Fill(Dim)"/>.
|
||||
/// </summary>
|
||||
public Toplevel ()
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.CommandLine;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -55,9 +56,11 @@ public class UICatalogApp
|
||||
private static int _cachedScenarioIndex;
|
||||
private static string? _cachedTheme = string.Empty;
|
||||
private static ObservableCollection<string>? _categories;
|
||||
[SuppressMessage ("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
|
||||
private static readonly FileSystemWatcher _currentDirWatcher = new ();
|
||||
private static ViewDiagnosticFlags _diagnosticFlags;
|
||||
private static string _forceDriver = string.Empty;
|
||||
[SuppressMessage ("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
|
||||
private static readonly FileSystemWatcher _homeDirWatcher = new ();
|
||||
private static bool _isFirstRunning = true;
|
||||
private static Options _options;
|
||||
@@ -406,7 +409,7 @@ public class UICatalogApp
|
||||
_diagnosticFlags = Diagnostics;
|
||||
|
||||
_themeMenuItems = CreateThemeMenuItems ();
|
||||
_themeMenuBarItem = new ("_Themes", _themeMenuItems);
|
||||
_themeMenuBarItem = new ("_Themes", _themeMenuItems!);
|
||||
|
||||
MenuBar menuBar = new ()
|
||||
{
|
||||
@@ -676,7 +679,7 @@ public class UICatalogApp
|
||||
|
||||
ColorScheme = Colors.ColorSchemes [_topLevelColorScheme];
|
||||
|
||||
MenuBar!.Menus [0].Children [0].ShortcutKey = Application.QuitKey;
|
||||
MenuBar!.Menus [0].Children! [0]!.ShortcutKey = Application.QuitKey;
|
||||
|
||||
if (StatusBar is { })
|
||||
{
|
||||
@@ -783,6 +786,7 @@ public class UICatalogApp
|
||||
|
||||
private void ConfigAppliedHandler (object? sender, ConfigurationManagerEventArgs? a) { ConfigChanged (); }
|
||||
|
||||
[SuppressMessage ("Style", "IDE1006:Naming Styles", Justification = "<Pending>")]
|
||||
private MenuItem [] CreateDiagnosticFlagsMenuItems ()
|
||||
{
|
||||
const string OFF = "View Diagnostics: _Off";
|
||||
|
||||
@@ -4,7 +4,7 @@ using Xunit.Abstractions;
|
||||
|
||||
namespace Terminal.Gui.FileServicesTests;
|
||||
|
||||
public class FileDialogTests (ITestOutputHelper output)
|
||||
public class FileDialogTests ()
|
||||
{
|
||||
[Theory]
|
||||
[InlineData (true)]
|
||||
@@ -787,7 +787,6 @@ public class FileDialogTests (ITestOutputHelper output)
|
||||
return dlg.Subviews.OfType<TextField> ().ElementAt (0);
|
||||
case FileDialogPart.SearchField:
|
||||
return dlg.Subviews.OfType<TextField> ().ElementAt (1);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException (nameof (part), part, null);
|
||||
}
|
||||
|
||||
@@ -81,4 +81,4 @@
|
||||
False
|
||||
</IncludeTestAssembly>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -342,7 +342,7 @@ public class DimTests
|
||||
#if DEBUG
|
||||
Assert.Equal ("Combine(Fill(Absolute(0))-Absolute(2))", v2.Height.ToString ());
|
||||
#else
|
||||
Assert.Equal ("Combine(Fill(0)-Absolute(2))", v2.Height.ToString ());
|
||||
Assert.Equal ("Combine(Fill(Absolute(0))-Absolute(2))", v2.Height.ToString ());
|
||||
#endif
|
||||
Assert.Equal (47, v2.Frame.Width); // 49-2=47
|
||||
Assert.Equal (89, v2.Frame.Height); // 98-5-2-2=89
|
||||
|
||||
Reference in New Issue
Block a user