mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
builds and runs. But not properly.
This commit is contained in:
@@ -1277,17 +1277,14 @@ public class OverlappedTests
|
||||
{
|
||||
public bool IsFocused { get; private set; }
|
||||
|
||||
public override bool OnEnter (View view)
|
||||
protected override bool OnEnter (View view)
|
||||
{
|
||||
IsFocused = true;
|
||||
return base.OnEnter (view);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnLeave (View view)
|
||||
{
|
||||
IsFocused = false;
|
||||
return base.OnLeave (view);
|
||||
}
|
||||
protected override void OnLeave (View view) { IsFocused = false; }
|
||||
}
|
||||
|
||||
private class TestView : View
|
||||
@@ -1298,16 +1295,16 @@ public class OverlappedTests
|
||||
}
|
||||
public bool IsFocused { get; private set; }
|
||||
|
||||
public override bool OnEnter (View view)
|
||||
protected override bool OnEnter (View view)
|
||||
{
|
||||
IsFocused = true;
|
||||
return base.OnEnter (view);
|
||||
|
||||
return false; // don't cancel
|
||||
}
|
||||
|
||||
public override bool OnLeave (View view)
|
||||
protected override void OnLeave (View view)
|
||||
{
|
||||
IsFocused = false;
|
||||
return base.OnLeave (view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1119,17 +1119,17 @@ public class ScrollViewTests (ITestOutputHelper output)
|
||||
CanFocus = true;
|
||||
}
|
||||
|
||||
public override bool OnEnter (View view)
|
||||
protected override bool OnEnter (View view)
|
||||
{
|
||||
Border.LineStyle = LineStyle.None;
|
||||
Border.Thickness = new (0);
|
||||
labelFill.Visible = true;
|
||||
view = this;
|
||||
|
||||
return base.OnEnter (view);
|
||||
return false; // don't cancel
|
||||
}
|
||||
|
||||
public override bool OnLeave (View view)
|
||||
protected override void OnLeave (View view)
|
||||
{
|
||||
Border.LineStyle = LineStyle.Single;
|
||||
Border.Thickness = new (1);
|
||||
@@ -1139,8 +1139,6 @@ public class ScrollViewTests (ITestOutputHelper output)
|
||||
{
|
||||
view = this;
|
||||
}
|
||||
|
||||
return base.OnLeave (view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -909,7 +909,7 @@ public class TextFieldTests (ITestOutputHelper output)
|
||||
var tf = new TextField { Width = 10 };
|
||||
top.Add (tf);
|
||||
|
||||
Exception exception = Record.Exception (tf.SetFocus);
|
||||
Exception exception = Record.Exception (() => tf.SetFocus());
|
||||
Assert.Null (exception);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user