mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Closes #973. ScrollView and TextField fixes.
This commit is contained in:
@@ -27,7 +27,7 @@ type Box10x (x: int, y: int) =
|
||||
raise (NotImplementedException())
|
||||
|
||||
override this.Redraw (_: Rect) =
|
||||
Application.Driver.SetAttribute Application.Current.ColorScheme.Focus
|
||||
Application.Driver.SetAttribute this.ColorScheme.Focus
|
||||
do
|
||||
let mutable y = 0
|
||||
while y < h do
|
||||
@@ -47,7 +47,7 @@ type Filler (rect: Rect) =
|
||||
new Filler ()
|
||||
|
||||
override this.Redraw (_: Rect) =
|
||||
Application.Driver.SetAttribute Application.Current.ColorScheme.Focus
|
||||
Application.Driver.SetAttribute this.ColorScheme.Focus
|
||||
let mutable f = this.Frame
|
||||
do
|
||||
let mutable y = 0
|
||||
|
||||
@@ -48,13 +48,13 @@ namespace Terminal.Gui {
|
||||
/// <param name="text">Initial text contents.</param>
|
||||
public TextField (string text) : this (ustring.Make (text))
|
||||
{
|
||||
Height = 1;
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/> positioning.
|
||||
/// </summary>
|
||||
public TextField () : this (string.Empty) { }
|
||||
public TextField () : this (string.Empty) { Initialize (); }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TextField"/> class using <see cref="LayoutStyle.Computed"/> positioning.
|
||||
@@ -80,6 +80,8 @@ namespace Terminal.Gui {
|
||||
|
||||
void Initialize (ustring text, int w)
|
||||
{
|
||||
Initialize ();
|
||||
|
||||
if (text == null)
|
||||
text = "";
|
||||
|
||||
@@ -91,6 +93,11 @@ namespace Terminal.Gui {
|
||||
WantMousePositionReports = true;
|
||||
}
|
||||
|
||||
void Initialize ()
|
||||
{
|
||||
Height = 1;
|
||||
}
|
||||
|
||||
///<inheritdoc/>
|
||||
public override bool OnLeave (View view)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user