Skip to content
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

Update dependency to 2329 #301

Draft
wants to merge 1 commit into
base: v2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Showcase/Showcase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2203" />
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2329" />
</ItemGroup>

</Project>
10 changes: 8 additions & 2 deletions src/DesignState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public DesignState(Design design)
this.Design = design;
this.OriginalScheme = this.Design.View.GetExplicitColorScheme();
this.Design.View.DrawContentComplete += this.DrawContentComplete;
this.Design.View.Enter += this.Enter;
this.Design.View.HasFocusChanged += this.FocusChanged;
}

/// <summary>
Expand All @@ -39,8 +39,14 @@ public DesignState(Design design)
/// </summary>
public Design Design { get; }

private void Enter(object? sender, FocusEventArgs obj)
private void FocusChanged(object? sender, HasFocusEventArgs obj)
{
if (!obj.NewValue)
{
// not an Enter event so ignore
return;
}

// when tabbing or clicking into this View when nothing complicated is going on (e.g. Ctrl+Click multi select)
if (SelectionManager.Instance.Selected.Count <= 1)
{
Expand Down
6 changes: 4 additions & 2 deletions src/TerminalGuiDesigner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageOutputPath>./nupkg</PackageOutputPath>
<ImplicitUsings>enable</ImplicitUsings>
<PackageId>TerminalGuiDesigner</PackageId>
<Version>2.0.0-alpha.2203</Version>
<Version>2.0.0-alpha.2239</Version>
<Authors>Thomas Nind</Authors>
<Nullable>enable</Nullable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -33,6 +33,8 @@
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>
2.0.0-alpha.2329
* Update to latest alpha package
2.0.0-alpha.2203
* True color `ColorPicker`
2.0.0-alpha.2189
Expand Down Expand Up @@ -150,7 +152,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2203" />
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2239" />
<PackageReference Include="nlog" Version="5.3.3" />
<PackageReference Include="Basic.Reference.Assemblies.Net80" Version="1.7.7" />
<PackageReference Include="System.CodeDom" Version="8.0.0" />
Expand Down
4 changes: 2 additions & 2 deletions src/UI/Windows/BigListBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public BigListBox(

this.callback = Application.AddTimeout(TimeSpan.FromMilliseconds(100), this.Timer);

this.listView.FocusFirst(TabBehavior.TabStop);
this.listView.SetFocus();
}


Expand Down Expand Up @@ -221,7 +221,7 @@ private void ListView_KeyPress(object? sender, Key key)
// backspace or letter/numbers
if (key == Key.Backspace || char.IsLetterOrDigit(c))
{
this.searchBox?.FocusFirst(TabBehavior.TabStop);
this.searchBox?.SetFocus();
this.searchBox?.NewKeyDownEvent(key);
key.Handled = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/UI/Windows/DimEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void RgDimType_KeyPress(object sender, Key obj)
// if user types in some text change the focus to the text box to enable entering digits
if ((obj == Key.Backspace || char.IsDigit(c)) && tbValue.Visible)
{
tbValue?.FocusFirst(TabBehavior.TabStop);
tbValue?.SetFocus();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/UI/Windows/PosEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void RgPosType_KeyPress(object sender, Key key)
// if user types in some text change the focus to the text box to enable entering digits
if ((key == Key.Backspace || char.IsDigit(c)) && tbValue.Visible)
{
tbValue?.FocusFirst(TabBehavior.TabStop);
tbValue?.SetFocus();
}
}

Expand Down
Loading