From 5088e87ed12014a8314589feec50eb5d6a82565b Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 1 Sep 2023 22:00:45 +0400 Subject: [PATCH] Change chars for `MultiSelect` items (#275) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change chars for `MultiSelect` items * Use '◌' for unchecked * Changelog * cargo fmt * Change symbol to '⬚' --- CHANGELOG.md | 1 + src/history.rs | 6 +++--- src/lib.rs | 2 +- src/prompts/input.rs | 1 - src/theme/colorful.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dd66ad2..6ee9319c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/history.rs b/src/history.rs index 33659235..1a772d7a 100644 --- a/src/history.rs +++ b/src/history.rs @@ -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); /// ``` diff --git a/src/lib.rs b/src/lib.rs index 19d71bcb..f8faae9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; diff --git a/src/prompts/input.rs b/src/prompts/input.rs index 709a46c0..4029da2d 100644 --- a/src/prompts/input.rs +++ b/src/prompts/input.rs @@ -14,7 +14,6 @@ use crate::{ type ValidatorCallback<'a, T> = Box Option + 'a>; - /// Renders an input prompt. /// /// ## Example diff --git a/src/theme/colorful.rs b/src/theme/colorful.rs index 49447371..1537a22f 100644 --- a/src/theme/colorful.rs +++ b/src/theme/colorful.rs @@ -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(), + unchecked_item_prefix: style("⬚".to_string()).for_stderr().magenta(), picked_item_prefix: style("❯".to_string()).for_stderr().green(), unpicked_item_prefix: style(" ".to_string()).for_stderr(), #[cfg(feature = "fuzzy-select")]