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
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,7 @@

* Added `dialouger::Result` and `dialouger::Error`
* Resolve some issues on Windows where pressing shift keys sometimes aborted dialogs.
* Resolve `MultiSelect` checked and unchecked variants looking the same on Windows.

### Breaking

Expand Down
6 changes: 3 additions & 3 deletions src/history.rs
Expand Up @@ -25,11 +25,11 @@ pub struct BasicHistory {
impl BasicHistory {
/// Creates a new basic history value which has no limit on the number of
/// entries and allows for duplicates.
///
///
/// # Example
///
///
/// A history with at most 8 entries and no duplicates:
///
///
/// ```rs
/// let mut history = BasicHistory::new().max_entries(8).no_duplicates(true);
/// ```
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -39,7 +39,7 @@ pub use completion::Completion;
pub use edit::Editor;
pub use error::{Error, Result};
#[cfg(feature = "history")]
pub use history::{History, BasicHistory};
pub use history::{BasicHistory, History};
use paging::Paging;
pub use validate::Validator;

Expand Down
1 change: 0 additions & 1 deletion src/prompts/input.rs
Expand Up @@ -14,7 +14,6 @@ use crate::{

type ValidatorCallback<'a, T> = Box<dyn FnMut(&T) -> Option<String> + 'a>;


/// Renders an input prompt.
///
/// ## Example
Expand Down
2 changes: 1 addition & 1 deletion src/theme/colorful.rs
Expand Up @@ -72,7 +72,7 @@ impl Default for ColorfulTheme {
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.

unchecked_item_prefix: style("".to_string()).for_stderr(),
picked_item_prefix: style("❯".to_string()).for_stderr().green(),
unpicked_item_prefix: style(" ".to_string()).for_stderr(),
#[cfg(feature = "fuzzy-select")]
Expand Down