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

Open
wants to merge 155 commits into
base: v2_develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 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
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
Expand Up @@ -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:
Expand All @@ -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 ();
}
Expand Down
6 changes: 3 additions & 3 deletions Examples/CommunityToolkitExample/LoginViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal partial class LoginViewModel : ObservableObject
private string _usernameLengthMessage;

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

[ObservableProperty]
private string _validationMessage;
Expand Down Expand Up @@ -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 });
Expand Down
3 changes: 2 additions & 1 deletion Examples/CommunityToolkitExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
}

Expand Down
4 changes: 2 additions & 2 deletions Examples/CommunityToolkitExample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down Expand Up @@ -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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Example/Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();

Expand All @@ -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 ()
{
Expand Down
1 change: 1 addition & 0 deletions Examples/NativeAot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Examples/ReactiveExample/LoginView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down
1 change: 1 addition & 0 deletions Examples/ReactiveExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions Examples/SelfContained/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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",
Expand Down Expand Up @@ -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
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
22 changes: 12 additions & 10 deletions Examples/UICatalog/Scenarios/Adornments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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!" };
Expand All @@ -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";
Expand All @@ -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
Expand Down
Loading
Loading