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

Change chars for MultiSelect items #275

Merged
merged 6 commits into from
Sep 1, 2023

Conversation

Gordon01
Copy link
Contributor

Windows Terminal, a widely used terminal emulator for some reason does not support coloring for '✔' char.
'✔️' and '❌' may be used instead. They work down to the previous Windows terminal emulator: conhost.exe.

Before:

Windows Terminal

image
As you can see, selected and unselected items are indistinguishable.

conhost.exe

image
Surprisingly, the old windows emulator is better than new one.

VSCode

image

After:

Windows Terminal

image

conhost.exe

image

VSCode

image

@Gordon01
Copy link
Contributor Author

This fixes #202 with a well-supported character down to early windows-style utf-16ish.

The theme looks good and is consistent on different emulators.

Additional testing is needed for: #149

@pksunkara
Copy link
Collaborator

IMHO, it doesn't look good.

@Gordon01
Copy link
Contributor Author

Which new rendering do you think is the worst?

The new VSCode's terminal rendering is questionable.

@pksunkara
Copy link
Collaborator

The same rendering is also used for Mac and Linux, where the X emoji does not look good.

@Gordon01
Copy link
Contributor Author

What about '☑' '☒' or '✔' '✘' '☓'

@@ -71,8 +71,8 @@ impl Default for ColorfulTheme {
inactive_item_style: Style::new().for_stderr(),
active_item_prefix: style("❯".to_string()).for_stderr().green(),
inactive_item_prefix: style(" ".to_string()).for_stderr(),
checked_item_prefix: style("✔".to_string()).for_stderr().green(),
unchecked_item_prefix: style("✔".to_string()).for_stderr().black(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Try but don't change the colors.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I checked locally and this looks too small on many fonts. I have tried many other characters; most are too small or too wide. looks the best. So, let's use that, and set the color to magenta

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I've checked locally too and it's good. Except conhost doesn't know this symbol but renders color correctly.

@Gordon01
Copy link
Contributor Author

Gordon01 commented Sep 1, 2023

'◌' looks good.
I removed the color because some emulators drew it black which is invisible on the default black background. Here are a few screenshots.

windows term:
image

conhost:
image

vscode:
image

black is invisible both in windows term and in conhost.exe:
image

CHANGELOG.md Outdated Show resolved Hide resolved
@Gordon01
Copy link
Contributor Author

Gordon01 commented Sep 1, 2023

Linting fails because of: #209

@pksunkara
Copy link
Collaborator

Feel free to fix it in this PR

@Gordon01
Copy link
Contributor Author

Gordon01 commented Sep 1, 2023

Linting and changelog fixed.

@Gordon01
Copy link
Contributor Author

Gordon01 commented Sep 1, 2023

image image

image

@pksunkara pksunkara merged commit 5088e87 into console-rs:master Sep 1, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants