fixed Top issue

This commit is contained in:
Charlie Kindel
2022-10-30 13:05:18 -06:00
parent 5dc2ec7606
commit 616af6527e
2 changed files with 2 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ namespace UICatalog.Scenarios {
public override void Init (Toplevel top, ColorScheme colorScheme)
{
Application.Init ();
Top = top;
Top = top != null ? top : Application.Top;
Win = new TestWindow ($"CTRL-Q to Close - Scenario: {GetName ()}") {
X = 0,

View File

@@ -14,11 +14,7 @@ namespace UICatalog.Scenarios {
public override void Init (Toplevel top, ColorScheme colorScheme)
{
Application.Init ();
Top = top;
if (Top == null) {
Top = Application.Top;
}
Top = top != null ? top : Application.Top;
Top.ColorScheme = Colors.Base;
}