Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
70660a3
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Nov 12, 2025
3de47ac
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Nov 12, 2025
b05373f
Add comprehensive unit tests for WindowsKeyConverter
tig Nov 12, 2025
52abbf9
Add test documenting VK_PACKET surrogate pair limitation
tig Nov 12, 2025
234521a
Mark WindowsKeyConverterTests as Windows-only
tig Nov 12, 2025
16b6af3
Properly mark WindowsKeyConverter tests as Windows-only
tig Nov 12, 2025
e56ba95
Refactor and enhance test coverage for input processors
tig Nov 12, 2025
8ebf25a
Use Trait-based platform filtering for WindowsKeyConverter tests
tig Nov 12, 2025
6162b85
Filter Windows-specific tests on non-Windows CI platforms
tig Nov 12, 2025
09b7991
Fix log path typo and remove Codecov upload step
tig Nov 12, 2025
77e2050
Merge branch 'v2_develop' into feature/windowskeyconverter-tests
tig Nov 12, 2025
b2abb41
Merge branch 'v2_develop' into feature/windowskeyconverter-tests
tig Nov 19, 2025
ad1c748
Merge branch 'v2_develop' into feature/windowskeyconverter-tests
tig Nov 20, 2025
733fb51
Refactor application reset logic
tig Nov 20, 2025
7372085
Improve null safety with ?. and ! operators
tig Nov 20, 2025
db0fc06
Improve Unicode tests and clarify surrogate pair handling
tig Nov 20, 2025
1c76a99
Merge branch 'v2_develop' into feature/windowskeyconverter-tests
tig Nov 20, 2025
43e2998
Merge branch 'feature/windowskeyconverter-tests' of tig:tig/Terminal.…
tig Nov 20, 2025
cf5ef72
Ensure platform-specific test execution on Windows
tig Nov 20, 2025
466c9ac
Integrate TrueColor support into ColorPicker
tig Nov 20, 2025
3c915d3
Revert workflow change.
tig Nov 20, 2025
2126d69
Reverted attribute that didn't actualy work.
tig Nov 20, 2025
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
29 changes: 28 additions & 1 deletion Examples/UICatalog/Scenarios/ColorPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace UICatalog.Scenarios;

[ScenarioMetadata ("ColorPicker", "Color Picker.")]
[ScenarioMetadata ("ColorPicker", "Color Picker and TrueColor demonstration.")]
[ScenarioCategory ("Colors")]
[ScenarioCategory ("Controls")]
public class ColorPickers : Scenario
Expand Down Expand Up @@ -220,6 +220,33 @@ public override void Main ()
};
app.Add (cbShowName);

var lblDriverName = new Label
{
Y = Pos.Bottom (cbShowName) + 1, Text = $"Driver is `{Application.Driver?.GetName ()}`:"
};
bool canTrueColor = Application.Driver?.SupportsTrueColor ?? false;

var cbSupportsTrueColor = new CheckBox
{
X = Pos.Right (lblDriverName) + 1,
Y = Pos.Top (lblDriverName),
CheckedState = canTrueColor ? CheckState.Checked : CheckState.UnChecked,
CanFocus = false,
Enabled = false,
Text = "SupportsTrueColor"
};
app.Add (cbSupportsTrueColor);

var cbUseTrueColor = new CheckBox
{
X = Pos.Right (cbSupportsTrueColor) + 1,
Y = Pos.Top (lblDriverName),
CheckedState = Application.Force16Colors ? CheckState.Checked : CheckState.UnChecked,
Enabled = canTrueColor,
Text = "Force16Colors"
};
cbUseTrueColor.CheckedStateChanging += (_, evt) => { Application.Force16Colors = evt.Result == CheckState.Checked; };
app.Add (lblDriverName, cbSupportsTrueColor, cbUseTrueColor);
// Set default colors.
foregroundColorPicker.SelectedColor = _demoView.SuperView!.GetAttributeForRole (VisualRole.Normal).Foreground.GetClosestNamedColor16 ();
backgroundColorPicker.SelectedColor = _demoView.SuperView.GetAttributeForRole (VisualRole.Normal).Background.GetClosestNamedColor16 ();
Expand Down
157 changes: 0 additions & 157 deletions Examples/UICatalog/Scenarios/TrueColors.cs

This file was deleted.

6 changes: 0 additions & 6 deletions Terminal.Gui/App/ApplicationImpl.Lifecycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,9 @@ private static void AssertNoEventSubscribers (string eventName, Delegate? eventD
}
#endif

private bool _isResetingState;

/// <inheritdoc/>
public void ResetState (bool ignoreDisposed = false)
{
_isResetingState = true;

// Shutdown is the bookend for Init. As such it needs to clean up all resources
// Init created. Apps that do any threading will need to code defensively for this.
// e.g. see Issue #537
Expand Down Expand Up @@ -250,8 +246,6 @@ public void ResetState (bool ignoreDisposed = false)
// gui.cs does no longer process any callbacks. See #1084 for more details:
// (https://github.com/gui-cs/Terminal.Gui/issues/1084).
SynchronizationContext.SetSynchronizationContext (null);

_isResetingState = false;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Terminal.Gui/Views/Color/ColorBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal abstract class ColorBar : View, IColorBar
/// </summary>
protected ColorBar ()
{
Height = 1;
Height = Dim.Auto(minimumContentDim: 1);
Width = Dim.Fill ();
CanFocus = true;

Expand Down
5 changes: 3 additions & 2 deletions Terminal.Gui/Views/Color/HueBar.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@


using ColorHelper;
using ColorConverter = ColorHelper.ColorConverter;

namespace Terminal.Gui.Views;

/// <summary>
/// A bar representing the Hue component of a <see cref="Color"/> in HSL color space.
/// </summary>
internal class HueBar : ColorBar
{
/// <inheritdoc/>
Expand Down
4 changes: 3 additions & 1 deletion Tests/IntegrationTests/UICatalog/ScenarioTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public void All_Scenarios_Quit_And_Init_Shutdown_Properly (Type scenarioType)
return;
}

Application.ResetState (true);
// Force a complete reset
ApplicationImpl.SetInstance (null);
CM.Disable (true);

_output.WriteLine ($"Running Scenario '{scenarioType}'");
Scenario? scenario = null;
Expand Down
Loading
Loading