Skip to content

Fixes #4057 - MASSIVE! Fully implements ColorScheme->Scheme + VisualRole + Colors.->SchemeManager. #4062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 190 commits into from
May 29, 2025
Merged
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
b0f050f
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Mar 21, 2025
a64b4bc
touching publish.yml
tig Mar 21, 2025
320384e
Merge branch 'v2_release' into v2_develop
tig Mar 21, 2025
4048436
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Mar 29, 2025
3b0311d
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Mar 29, 2025
ae79c48
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Mar 30, 2025
1c39896
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 1, 2025
2cee67f
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 1, 2025
9560cf3
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 2, 2025
0795dd1
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 2, 2025
4baccd7
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 3, 2025
7d7ffad
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 5, 2025
c37210a
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 5, 2025
680e5ae
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 16, 2025
3cba0a5
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 23, 2025
9bbec08
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 24, 2025
64403fa
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 24, 2025
5e1251c
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 24, 2025
49cd335
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 25, 2025
9a8e4e3
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 25, 2025
ef6d193
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 25, 2025
4c0c504
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 25, 2025
4f5fca2
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 28, 2025
f8bfab8
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Apr 28, 2025
898c2de
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Apr 28, 2025
76a0d08
ColorScheme->Scheme
tig Apr 28, 2025
bd94e3e
ColorScheme->Scheme 2
tig Apr 28, 2025
2195f3e
Prototype of GetAttributeForRole
tig Apr 28, 2025
fb48897
Badly broke CM
tig Apr 29, 2025
b45a8bd
Further Badly broke CM
tig Apr 30, 2025
df7a3e5
Refactored CM big-time. View still broken
tig May 2, 2025
d1cd96b
All unit test pass again. Tons added. CM is still WIP, but Schemes is…
tig May 3, 2025
09b9dc2
Actually:
tig May 3, 2025
ebae574
Bug fixes.
tig May 3, 2025
ba2c475
Further cleanup of Scope<T>, ConfigProperty, etc.
tig May 3, 2025
a2d4e98
Made ConfigManager thread safe.
tig May 3, 2025
51a9e69
WIP: Broken
tig May 7, 2025
cd10bb3
Merge branch 'gui-cs:v2_develop' into v2_develop
tig May 7, 2025
a34d5fe
WIP: new deep clone impl
tig May 9, 2025
d412c00
Merge branch 'gui-cs:v2_develop' into v2_develop
tig May 9, 2025
0036add
WIP: new deep clone impl is done. Now fixing CM
tig May 9, 2025
4178604
WIP:
tig May 9, 2025
87ff9ea
WIP
tig May 10, 2025
66f2c62
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig May 11, 2025
2c9b9a6
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 11, 2025
abfa66a
Merge branch 'gui-cs:v2_develop' into v2_develop
tig May 11, 2025
d9dcca4
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig May 11, 2025
d600a6b
Merge branch 'v2_develop' into v2_4057-Scheme-VisualRole
tig May 11, 2025
9511e37
Merged.
tig May 11, 2025
2d0fdd4
WIP
tig May 12, 2025
7d89539
merged. WIP - Very broken
tig May 12, 2025
8e58cc3
More WIP; Less broke
tig May 12, 2025
637dd1b
All CM unit tests pass... Not sure if it actually works though
tig May 13, 2025
ee05b04
All unit tests pass... Themes are broken though in UI Cat
tig May 13, 2025
6fc7fd6
CM Ready for review?
tig May 13, 2025
a65aebc
Merge branch 'v2_develop' into v2_4057-Scheme-VisualRole
tig May 13, 2025
614bcbf
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 13, 2025
8ca41f3
Fixed failures due to TextStyles PR
tig May 13, 2025
3a02fa2
Working on Scheme/Attribute
tig May 13, 2025
1a76182
Working on Scheme/Attribute 2
tig May 13, 2025
504e6c4
Working on Scheme/Attribute 3
tig May 14, 2025
c8343c7
Working on Scheme/Attribute 4
tig May 14, 2025
704314d
Working on Scheme/Attribute 5
tig May 14, 2025
9a5026b
Working on Scheme/Attribute 6
tig May 14, 2025
fb49422
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 14, 2025
912d7ca
Added test to show how awful memory usage is
tig May 14, 2025
f5435cd
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 14, 2025
50f4d72
Improved schema. Updated config.json
tig May 14, 2025
7d7d366
Nade Scope<T> concurrentdictionary and added test to prove
tig May 14, 2025
d3c8f34
Made Themes ConcrurrentDictionary. Added bunches of tests
tig May 14, 2025
bda040a
Code cleanup
tig May 14, 2025
971b12e
Code cleanup 2
tig May 14, 2025
dac2a74
Code cleanup 3
tig May 14, 2025
c7b1dd5
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 15, 2025
53d1422
Tweaking Scheme
tig May 15, 2025
21a5c48
ClearJsonErrors
tig May 15, 2025
fc8086e
ClearJsonErrors2
tig May 15, 2025
7d1a1b9
Merge branch 'v2_develop' into v2_4057-Scheme-VisualRole
tig May 15, 2025
d79d2f6
Updated Attribute API
tig May 15, 2025
42885f3
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 15, 2025
efd16c1
It all (mostly) works!
tig May 15, 2025
ced4521
Skip odd unit test
tig May 15, 2025
0c7fb32
Messed with Themes
tig May 15, 2025
224bbea
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 15, 2025
eb4696b
Theme tweaks
tig May 15, 2025
b06de6e
Code reorg. New .md stuff
tig May 15, 2025
8448e98
Fixed Enabled. Added mock driver
tig May 15, 2025
697d302
Fixed a bunch of View.Enabled related issues
tig May 15, 2025
0361d77
Scheme -> Get/SetScheme()
tig May 15, 2025
d3c1126
Cleanup
tig May 16, 2025
cb3eb4d
Cleanup2
tig May 16, 2025
baf6317
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 16, 2025
b05df5f
Broke something
tig May 16, 2025
0da2be2
Fixed everything
tig May 16, 2025
9bb19c2
Made CM.Enable better
tig May 16, 2025
45fe8ae
Text Style Scenario
tig May 16, 2025
7188167
Added comments
tig May 16, 2025
529c52a
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 16, 2025
e42e421
Fixed UI Catalog Theme Changing
tig May 16, 2025
04b2e8f
Fixed more dynamic CM update stuff
tig May 16, 2025
55ac735
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 17, 2025
75cce49
Warning cleanup
tig May 17, 2025
4b00db5
New Default Theme
tig May 17, 2025
cc0fb8d
fixed unit test
tig May 17, 2025
2a42e9b
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 17, 2025
1919b25
Refactoring Scheme and Attribute to fix inheritance
tig May 17, 2025
08258b4
more unit tests
tig May 17, 2025
70b2ea8
ConfigProperty is not updating schemes correctly
tig May 17, 2025
4c055de
All unit tests pass.
tig May 18, 2025
e2b4529
All unit tests pass.
tig May 18, 2025
b5792cc
Fixed unit tests
tig May 18, 2025
5e75f36
Upgraded TextField and TextView
tig May 18, 2025
24ab9fb
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 19, 2025
77a04df
Fixed TextView !Enabled bug
tig May 19, 2025
84ad8a2
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 19, 2025
5a689a4
More updates to TextView. More unit tests for SchemeManager
tig May 19, 2025
fcbbddd
Upgraded CharMap
tig May 19, 2025
5e7304f
API docs
tig May 19, 2025
0fa20ca
Fixe HexView API
tig May 19, 2025
b131b09
upgrade HexView
tig May 19, 2025
562ea61
Fixed shortcut KeyView
tig May 19, 2025
381c557
Fixed more bugs. Added new themes
tig May 19, 2025
996b920
updated themes
tig May 19, 2025
b7aa2c8
upgraded Border
tig May 19, 2025
003f3e0
Fixed themes memory usage...mostly
tig May 20, 2025
520040d
Fixed themes memory usage...mostly2
tig May 20, 2025
625f2c3
Fixed themes memory usage...2
tig May 20, 2025
c379bee
Fixed themes memory usage...3
tig May 20, 2025
2152188
Added new colors
tig May 20, 2025
9fbfd4e
Fixed GetHardCodedConfig bug
tig May 20, 2025
41717a9
Added Themes Scenario - WIP
tig May 20, 2025
7adf6c6
Added Themes Scenario
tig May 20, 2025
851810f
Tweaked Themes Scenario
tig May 20, 2025
5bb7a65
Code cleanup
tig May 21, 2025
cec23d4
Fixed json schmea
tig May 21, 2025
44bf10a
Merge branch 'v2_develop' into v2_4057-Scheme-VisualRole
tig May 21, 2025
8c83ce3
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 21, 2025
9176294
updated deepdives
tig May 21, 2025
33a8e47
updated deepdives
tig May 21, 2025
0f39677
Tweaked Themes Scenario
tig May 21, 2025
bf2f5e4
Made Schemes a concurrent dict
tig May 21, 2025
7e463f5
Test cleanup
tig May 21, 2025
c706f0b
Thread safe ConfigProperty tests
tig May 21, 2025
9855865
trying to make things more thread safe
tig May 22, 2025
b0ec4de
more trying to make things more thread safe
tig May 22, 2025
d4ea8a3
Fixing bugs in shadowview
tig May 22, 2025
5767c3e
Fixing bugs in shadowview 2
tig May 22, 2025
01d7e2f
Refactored GetViewsUnderMouse to GetViewsUnderLocation etc...
tig May 22, 2025
68e3e59
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 23, 2025
079678b
Fixed dupe unit tests?
tig May 23, 2025
e444369
Added better description of layout and coordiantes to deep dive
tig May 23, 2025
9a2684c
Added better description of layout and coordiantes to deep dive
tig May 23, 2025
7749c00
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 23, 2025
7bd093d
Modified tests that call v2.AddTimeout; they were returning true whic…
tig May 23, 2025
9628237
Fixed auto scheme.
tig May 23, 2025
844142e
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 25, 2025
365e1de
Realized Attribute.IsExplicitlySet is stupid; just use nullable
tig May 25, 2025
f2968ab
Fixed Attribute. Simplified. MOre theme testing
tig May 26, 2025
c2af72a
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 26, 2025
cfe8d10
Updated themes again
tig May 26, 2025
56b1a54
GetViewsUnderMouse to GetViewsUnderLocation broke TransparentMouse.
tig May 26, 2025
51ed35a
Fixing mouseunder bugs
tig May 27, 2025
8def526
rewriting...
tig May 27, 2025
f5b3f13
All working again.
tig May 28, 2025
cf35198
Code cleanup
tig May 28, 2025
4cce6f3
Code cleanup
tig May 28, 2025
44f18c1
Code cleanup of color apis
tig May 28, 2025
edf4d97
Fixed Hover/Highlight
tig May 28, 2025
c98137c
Update Examples/UICatalog/Scenarios/AllViewsTester.cs
tig May 28, 2025
ea0d02c
Update Examples/UICatalog/Scenarios/CharacterMap/CharacterMap.cs
tig May 28, 2025
bdb2dc5
Update Examples/UICatalog/Scenarios/Clipping.cs
tig May 28, 2025
b01b33c
Merge branch 'v2_4057-Scheme-VisualRole' of tig:tig/Terminal.Gui into…
tig May 28, 2025
dba9df4
Fixed race condition?
tig May 29, 2025
d64b48f
reverted
tig May 29, 2025
5323615
Simplified Attribute API by removing events from SetAttributeForRole
tig May 29, 2025
f26b07b
Removed recursion from GetViewsAtLocation
tig May 29, 2025
d429744
Removed unneeded code
tig May 29, 2025
499e17b
Code clean up.
tig May 29, 2025
4471456
reverted temporary disable
tig May 29, 2025
4fd36b8
Adjusted scheme algo
tig May 29, 2025
163df44
Upgraded TextValidateField
tig May 29, 2025
2b891ce
Fixed TextValidate bugs
tig May 29, 2025
f37546c
Tweaks
tig May 29, 2025
1efaa9b
Frameview rounded border by default
tig May 29, 2025
09e545a
API doc cleanup
tig May 29, 2025
bffc639
Readme fix
tig May 29, 2025
023c6bd
Addressed tznind feeback
tig May 29, 2025
620f434
Fixed more unit test issues by protecting Application statics from be…
tig May 29, 2025
3b6616e
Fixed more unit test issues by protecting Application statics from be…
tig May 29, 2025
350a885
cleanup
tig May 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Examples/CommunityToolkitExample/LoginView.cs
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ public void Receive (Message<LoginActions> message)
{
loginProgressLabel.Text = ViewModel.LoginProgressMessage;
validationLabel.Text = ViewModel.ValidationMessage;
validationLabel.ColorScheme = ViewModel.ValidationColorScheme;
validationLabel.SetScheme (ViewModel.ValidationScheme);
break;
}
case LoginActions.LoginProgress:
@@ -58,11 +58,11 @@ public void Receive (Message<LoginActions> message)
case LoginActions.Validation:
{
validationLabel.Text = ViewModel.ValidationMessage;
validationLabel.ColorScheme = ViewModel.ValidationColorScheme;
validationLabel.SetScheme (ViewModel.ValidationScheme);
break;
}
}
SetText();
SetText ();
// BUGBUG: This should not be needed:
Application.LayoutAndDraw ();
}
6 changes: 3 additions & 3 deletions Examples/CommunityToolkitExample/LoginViewModel.cs
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ internal partial class LoginViewModel : ObservableObject
private string _usernameLengthMessage;

[ObservableProperty]
private ColorScheme? _validationColorScheme;
private Scheme? _validationScheme;

[ObservableProperty]
private string _validationMessage;
@@ -107,14 +107,14 @@ private void SendMessage (LoginActions loginAction, string message = "")
case LoginActions.Clear:
LoginProgressMessage = message;
ValidationMessage = INVALID_LOGIN_MESSAGE;
ValidationColorScheme = Colors.ColorSchemes ["Error"];
ValidationScheme = SchemeManager.GetScheme ("Error");
break;
case LoginActions.LoginProgress:
LoginProgressMessage = message;
break;
case LoginActions.Validation:
ValidationMessage = CanLogin ? VALID_LOGIN_MESSAGE : INVALID_LOGIN_MESSAGE;
ValidationColorScheme = CanLogin ? Colors.ColorSchemes ["Base"] : Colors.ColorSchemes ["Error"];
ValidationScheme = CanLogin ? SchemeManager.GetScheme ("Base") : SchemeManager.GetScheme("Error");
break;
}
WeakReferenceMessenger.Default.Send (new Message<LoginActions> { Value = loginAction });
3 changes: 2 additions & 1 deletion Examples/CommunityToolkitExample/Program.cs
Original file line number Diff line number Diff line change
@@ -9,10 +9,11 @@ public static class Program

private static void Main (string [] args)
{
ConfigurationManager.Enable (ConfigLocations.All);
Services = ConfigureServices ();
Application.Init ();
Application.Run (Services.GetRequiredService<LoginView> ());
Application.Top?.Dispose();
Application.Top?.Dispose ();
Application.Shutdown ();
}

4 changes: 2 additions & 2 deletions Examples/CommunityToolkitExample/README.md
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ private void SendMessage (LoginAction loginAction, string message = "")
break;
case LoginAction.Validation:
ValidationMessage = CanLogin ? VALID_LOGIN_MESSAGE : INVALID_LOGIN_MESSAGE;
ValidationColorScheme = CanLogin ? Colors.ColorSchemes ["Base"] : Colors.ColorSchemes ["Error"];
ValidationScheme = CanLogin ? Colors.Schemes ["Base"] : Colors.Schemes ["Error"];
break;
}
WeakReferenceMessenger.Default.Send (new Message<LoginAction> { Value = loginAction });
@@ -144,7 +144,7 @@ public void Receive (Message<LoginAction> message)
case LoginAction.Validation:
{
validationLabel.Text = ViewModel.ValidationMessage;
validationLabel.ColorScheme = ViewModel.ValidationColorScheme;
validationLabel.Scheme = ViewModel.ValidationScheme;
break;
}
}
4 changes: 2 additions & 2 deletions Examples/Example/Example.cs
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@

// A simple Terminal.Gui example in C# - using C# 9.0 Top-level statements

using System;
using Terminal.Gui;

// Override the default configuration for the application to use the Light theme
ConfigurationManager.RuntimeConfig = """{ "Theme": "Light" }""";
ConfigurationManager.Enable(ConfigLocations.All);

Application.Run<ExampleWindow> ().Dispose ();

@@ -21,7 +21,7 @@
// Defines a top-level window with border and title
public class ExampleWindow : Window
{
public static string UserName;
public static string UserName { get; set; }

public ExampleWindow ()
{
1 change: 1 addition & 0 deletions Examples/NativeAot/Program.cs
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ public static class Program
[RequiresDynamicCode ("Calls Terminal.Gui.Application.Init(IConsoleDriver, String)")]
private static void Main (string [] args)
{
ConfigurationManager.Enable(ConfigLocations.All);
Application.Init ();

#region The code in this region is not intended for use in a native Aot self-contained. It's just here to make sure there is no functionality break with localization in Terminal.Gui using self-contained
4 changes: 2 additions & 2 deletions Examples/ReactiveExample/LoginView.cs
Original file line number Diff line number Diff line change
@@ -96,8 +96,8 @@ public LoginView (LoginViewModel viewModel)

ViewModel
.WhenAnyValue (x => x.IsValid)
.Select (valid => valid ? Colors.ColorSchemes ["Base"] : Colors.ColorSchemes ["Error"])
.BindTo (validation, x => x.ColorScheme)
.Select (valid => valid ? SchemeManager.GetScheme ("Base") : SchemeManager.GetScheme ("Error"))
.BindTo (validation, x => x.GetScheme ())
.DisposeWith (_disposable);
})
.AddControlAfter<Button> ((previous, login) =>
1 change: 1 addition & 0 deletions Examples/ReactiveExample/Program.cs
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ public static class Program
{
private static void Main (string [] args)
{
ConfigurationManager.Enable (ConfigLocations.All);
Application.Init ();
RxApp.MainThreadScheduler = TerminalScheduler.Default;
RxApp.TaskpoolScheduler = TaskPoolScheduler.Default;
1 change: 1 addition & 0 deletions Examples/SelfContained/Program.cs
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ public static class Program
[RequiresUnreferencedCode ("Calls Terminal.Gui.Application.Run<T>(Func<Exception, Boolean>, IConsoleDriver)")]
private static void Main (string [] args)
{
ConfigurationManager.Enable (ConfigLocations.All);
Application.Init ();

#region The code in this region is not intended for use in a self-contained single-file. It's just here to make sure there is no functionality break with localization in Terminal.Gui using single-file
15 changes: 12 additions & 3 deletions Examples/UICatalog/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"profiles": {
"UICatalog": {
"commandName": "Project"
"commandName": "Project",
"commandLineArgs": "--debug-log-level Debug"
},
"UICatalog --driver NetDriver": {
"commandName": "Project",
@@ -60,9 +61,17 @@
"commandName": "Project",
"commandLineArgs": "\"All Views Tester\" -b -t 5000"
},
"Charmap": {
"UICatalog --disable-cm": {
"commandName": "Project",
"commandLineArgs": "--disable-cm\r\n"
},
"UICatalog --disable-cm --driver v2win": {
"commandName": "Project",
"commandLineArgs": "--disable-cm --driver v2win"
},
"Themes": {
"commandName": "Project",
"commandLineArgs": "Bars -b"
"commandLineArgs": "Themes"
}
}
}
51 changes: 20 additions & 31 deletions Examples/UICatalog/Resources/config.json
Original file line number Diff line number Diff line change
@@ -4,37 +4,12 @@
"FileDialogStyle.DefaultUseColors": false,
"FileDialogStyle.DefaultUseUnicodeCharacters": false,
"AppSettings": {
"UICatalog.StatusBar": true,
"ConfigurationEditor.EditorColorScheme": {
"Normal": {
"Foreground": "Red",
"Background": "White"
},
"Focus": {
"Foreground": "Green",
"Background": "White"
},
"HotNormal": {
"Foreground": "Black",
"Background": "White"
},
"HotFocus": {
"Foreground": "White",
"Background": "BrightRed"
},
"Disabled": {
"Foreground": "DarkGray",
"Background": "White"
}
}
"UICatalog.StatusBar": true
},
"Themes": [
{
"Hot Dog Stand": {
"Button.DefaultShadow": "Opaque",
"Dialog.DefaultShadow": "Transparent",
"Dialog.DefaultButtonAlignment": "Center",
"ColorSchemes": [
"Schemes": [
{
"Toplevel": {
"Normal": {
@@ -160,10 +135,24 @@
},
{
"UI Catalog Theme": {
"Button.DefaultShadow": "Opaque",
"Dialog.DefaultShadow": "Transparent",
"Dialog.DefaultButtonAlignment": "Center",
"ColorSchemes": [
"Window.DefaultShadow": "Transparent",
"CheckBox.DefaultHighlightStyle": "Hover, Pressed, PressedOutside",
"MessageBox.DefaultButtonAlignment": "Start",
"StatusBar.DefaultSeparatorLineStyle": "Single",
"Dialog.DefaultMinimumWidth": 80,
"MessageBox.DefaultBorderStyle": "Dotted",
"NerdFonts.Enable": false,
"MessageBox.DefaultMinimumWidth": 0,
"Window.DefaultBorderStyle": "Double",
"Dialog.DefaultShadow": "Opaque",
"Dialog.DefaultButtonAlignment": "Start",
"Button.DefaultShadow": "Transparent",
"FrameView.DefaultBorderStyle": "Double",
"MessageBox.DefaultMinimumHeight": 0,
"Button.DefaultHighlightStyle": "Hover, Pressed",
"Menuv2.DefaultBorderStyle": "Heavy",
"MenuBarv2.DefaultBorderStyle": "Heavy",
"Schemes": [
{
"UI Catalog Scheme": {
"Normal": {
22 changes: 12 additions & 10 deletions Examples/UICatalog/Scenarios/Adornments.cs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ public override void Main ()
Title = "The _Window",
Arrangement = ViewArrangement.Overlapped | ViewArrangement.Movable,

Width = Dim.Fill (Dim.Func (() => editor.Frame.Width )),
Width = Dim.Fill (Dim.Func (() => editor.Frame.Width)),
Height = Dim.Fill ()
};
app.Add (window);
@@ -47,13 +47,15 @@ public override void Main ()

color.ColorChanged += (s, e) =>
{
color.SuperView.ColorScheme = new (color.SuperView.ColorScheme)
{
Normal = new (
color.SuperView.ColorScheme.Normal.Foreground,
e.CurrentValue
)
};
color.SuperView!.SetScheme (
new (color.SuperView.GetScheme ())
{
Normal = new (
color.SuperView.GetAttributeForRole (VisualRole.Normal).Foreground,
e.CurrentValue,
color.SuperView.GetAttributeForRole (VisualRole.Normal).Style
)
});
};

var button = new Button { X = Pos.Center (), Y = Pos.Center (), Text = "Press me!" };
@@ -80,7 +82,7 @@ public override void Main ()
Width = 40,
Height = Dim.Percent (20),
Text = "Label\nY=AnchorEnd(),Height=Dim.Percent(10)",
ColorScheme = Colors.ColorSchemes ["Dialog"]
SchemeName = "Dialog"
};

window.Margin.Data = "Margin";
@@ -94,7 +96,7 @@ public override void Main ()
window.Padding.Data = "Padding";
window.Padding.Text = "Padding Text line 1\nPadding Text line 3\nPadding Text line 3\nPadding Text line 4\nPadding Text line 5";
window.Padding.Thickness = new (3);
window.Padding.ColorScheme = Colors.ColorSchemes ["Error"];
window.Padding.SchemeName = "Error";
window.Padding.CanFocus = true;

var longLabel = new Label
Loading

Unchanged files with check annotations Beta

private readonly V2TestDriver _driver;
private bool _finished;
internal GuiTestContext (Func<Toplevel> topLevelBuilder, int width, int height, V2TestDriver driver)

Check warning on line 27 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Non-nullable field '_ex' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
IApplication origApp = ApplicationImpl.Instance;
ILogger? origLogger = Logging.Logger;
return WaitIteration ();
}
public GuiTestContext ScreenShot (string title, TextWriter writer)

Check warning on line 199 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Missing XML comment for publicly visible type or member 'GuiTestContext.ScreenShot(string, TextWriter)'
{
writer.WriteLine (title + ":");
var text = Application.ToString ();
/// <returns></returns>
public GuiTestContext LeftClick (int screenX, int screenY) { return Click (WindowsConsole.ButtonState.Button1Pressed, screenX, screenY); }
public GuiTestContext LeftClick<T> (Func<T, bool> evaluator) where T : View { return Click (WindowsConsole.ButtonState.Button1Pressed, evaluator); }

Check warning on line 299 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Missing XML comment for publicly visible type or member 'GuiTestContext.LeftClick<T>(Func<T, bool>)'
private GuiTestContext Click<T> (WindowsConsole.ButtonState btn, Func<T, bool> evaluator) where T : View
{
{
case V2TestDriver.V2Win:
_winInput.InputBuffer.Enqueue (

Check warning on line 315 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Dereference of a possibly null reference.
new ()
{
EventType = WindowsConsole.EventType.Mouse,
;
}
public GuiTestContext Down ()

Check warning on line 364 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Missing XML comment for publicly visible type or member 'GuiTestContext.Down()'
{
switch (_driver)
{
down.bKeyDown = true;
up.bKeyDown = false;
_winInput.InputBuffer.Enqueue (

Check warning on line 612 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Dereference of a possibly null reference.
new ()
{
EventType = WindowsConsole.EventType.Key,
WaitIteration ();
}
private void SendNetKey (ConsoleKeyInfo consoleKeyInfo) { _netInput.InputBuffer.Enqueue (consoleKeyInfo); }

Check warning on line 629 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Dereference of a possibly null reference.
/// <summary>
/// Sends a special key e.g. cursor key that does not map to a specific character
/// <param name="specialKey"></param>
private void SendWindowsKey (ConsoleKeyMapping.VK specialKey)
{
_winInput.InputBuffer.Enqueue (

Check warning on line 637 in Tests/TerminalGuiFluentTesting/GuiTestContext.cs

GitHub Actions / build_release

Dereference of a possibly null reference.
new ()
{
EventType = WindowsConsole.EventType.Key,
internal class FakeOutput : IConsoleOutput
{
public IOutputBuffer LastBuffer { get; set; }

Check warning on line 8 in Tests/TerminalGuiFluentTesting/FakeOutput.cs

GitHub Actions / build_release

Non-nullable property 'LastBuffer' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
public Size Size { get; set; }
/// <inheritdoc/>
internal class TextWriterLogger (TextWriter writer) : ILogger
{
public IDisposable? BeginScope<TState> (TState state) { return null; }

Check warning on line 7 in Tests/TerminalGuiFluentTesting/TextWriterLogger.cs

GitHub Actions / build_release

Nullability in constraints for type parameter 'TState' of method 'TextWriterLogger.BeginScope<TState>(TState)' doesn't match the constraints for type parameter 'TState' of interface method 'ILogger.BeginScope<TState>(TState)'. Consider using an explicit interface implementation instead.
public bool IsEnabled (LogLevel logLevel) { return true; }
private class Watch
{
// BUGBUG: Fix this nullable issue.
public Func<MainLoop, bool> Callback;

Check warning on line 251 in Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs

GitHub Actions / Non-Parallel Unit Tests (ubuntu-latest)

Non-nullable field 'Callback' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 251 in Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs

GitHub Actions / build_and_test_debug (windows-latest)

Non-nullable field 'Callback' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 251 in Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs

GitHub Actions / Non-Parallel Unit Tests (windows-latest)

Non-nullable field 'Callback' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
public Condition Condition;
public int File;
}
while (wch2 == Curses.KeyMouse)
{
// BUGBUG: Fix this nullable issue.
Key kea = null;

Check warning on line 732 in Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

GitHub Actions / build_and_test_debug (windows-latest)

Converting null literal or possible null value to non-nullable type.

Check warning on line 732 in Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

GitHub Actions / Non-Parallel Unit Tests (windows-latest)

Converting null literal or possible null value to non-nullable type.
ConsoleKeyInfo [] cki =
{
};
code = 0;
// BUGBUG: Fix this nullable issue.
HandleEscSeqResponse (ref code, ref k, ref wch2, ref kea, ref cki);

Check warning on line 742 in Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

GitHub Actions / build_and_test_debug (windows-latest)

Possible null reference assignment.

Check warning on line 742 in Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

GitHub Actions / Non-Parallel Unit Tests (windows-latest)

Possible null reference assignment.
}
return;