Skip to content

Fixes #5438 - Update CheckState default glyphs#5439

Merged
tig merged 3 commits into
developfrom
copilot/update-checkbox-glyphs
May 28, 2026
Merged

Fixes #5438 - Update CheckState default glyphs#5439
tig merged 3 commits into
developfrom
copilot/update-checkbox-glyphs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 28, 2026

Fixes

Default CheckState glyphs made checked and indeterminate states harder to distinguish in common terminal fonts.

State Default
Checked
Unchecked
Indeterminate

This PR also clarifies ListView mark-column behavior in code/docs so wide glyph rendering intent is explicit.

Proposed Changes/Todos

  • Update Glyphs.CheckStateChecked from to
  • Update Glyphs.CheckStateNone from to
  • Align bundled theme config overrides with the new defaults
  • Update related API/comment text
  • Add focused unit coverage for default CheckState glyph values
  • Clarify ListView mark-width documentation and local naming to make wide-glyph spacing behavior explicit

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

Copilot AI changed the title [WIP] Update indeterminate checkbox glyph for better distinction Update CheckState default glyphs May 28, 2026
Copilot finished work on behalf of tig May 28, 2026 16:00
Copilot AI requested a review from tig May 28, 2026 16:00
@tig tig changed the title Update CheckState default glyphs Fixes #5438 - Update CheckState default glyphs May 28, 2026
@tig tig marked this pull request as ready for review May 28, 2026 16:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the default CheckState glyphs so the three states are easier to distinguish in common terminal fonts: Checked becomes ☑ (was ☒), None becomes ⬛ (was □), UnChecked stays ☐. Bundled themes (TurboPascal 5, Anders) and related doc comments are updated to match, and a small unit test pins the new defaults.

Changes:

  • Change Glyphs.CheckStateChecked default to ☑ and Glyphs.CheckStateNone default to ⬛.
  • Align bundled theme JSON overrides and CheckBox/ListView doc comments with the new defaults.
  • Add a CheckBox unit test asserting the new default glyph values.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Terminal.Gui/Drawing/Glyphs.cs New default runes for CheckStateChecked and CheckStateNone.
Terminal.Gui/Resources/config.json Updates TurboPascal 5 and Anders theme overrides to match new defaults.
Terminal.Gui/Views/CheckBox.cs Doc comment updated to describe ⬛ for CheckState.None.
Terminal.Gui/Views/ListView/ListView.Selection.cs Doc comment updated from ☒ to ☑ for checkbox marks.
Terminal.Gui/Views/ListView/ListView.Drawing.cs Inline comment updated from ☒ to ☑.
Tests/UnitTestsParallelizable/Views/CheckBoxTests.cs New test pinning default CheckState glyph values.

Comment thread Terminal.Gui/Drawing/Glyphs.cs
Copilot finished work on behalf of tig May 28, 2026 16:49
Copilot AI requested a review from tig May 28, 2026 16:49
tig added a commit that referenced this pull request May 28, 2026
- ToggleChecked now correctly handles all cases:
  - If effective state is not UnChecked, toggle to UnChecked (propagates to children)
  - If effective state is UnChecked but descendants have explicit checked state
    (collapsed parent scenario), also toggle to UnChecked
  - Only toggle to Checked when fully unchecked with no checked descendants
- Add HasCheckedDescendantsInState helper for collapsed-parent detection
- Add comprehensive mouse-click test that clicks children individually then
  unchecks parent (mimics exact UICatalog user scenario)
- Revert Glyphs.cs emoji changes (PR #5439 handles glyph updates separately)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tig tig merged commit 1019953 into develop May 28, 2026
13 checks passed
@tig tig deleted the copilot/update-checkbox-glyphs branch May 28, 2026 17:53
tig added a commit that referenced this pull request May 28, 2026
- ToggleChecked now correctly handles all cases:
  - If effective state is not UnChecked, toggle to UnChecked (propagates to children)
  - If effective state is UnChecked but descendants have explicit checked state
    (collapsed parent scenario), also toggle to UnChecked
  - Only toggle to Checked when fully unchecked with no checked descendants
- Add HasCheckedDescendantsInState helper for collapsed-parent detection
- Add comprehensive mouse-click test that clicks children individually then
  unchecks parent (mimics exact UICatalog user scenario)
- Revert Glyphs.cs emoji changes (PR #5439 handles glyph updates separately)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indeterminate checkbox glyph (□ U+25A1) is too similar to unchecked (☐ U+2610)

4 participants