mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 13:48:16 +08:00
Enhance the style of the checkboxes for multi-selection (#1244)
* Enhance the checkboxes' style for multi-selection by applying the selected style, if available, to the checkboxes currently selected.
This commit is contained in:
@ -257,8 +257,7 @@ public sealed class MultiSelectionPrompt<T> : IPrompt<List<T>>, IListPromptStrat
|
||||
}
|
||||
|
||||
var checkbox = item.Node.IsSelected
|
||||
? (item.Node.IsGroup && Mode == SelectionMode.Leaf
|
||||
? ListPromptConstants.GroupSelectedCheckbox : ListPromptConstants.SelectedCheckbox)
|
||||
? ListPromptConstants.GetSelectedCheckbox(item.Node.IsGroup, Mode, HighlightStyle)
|
||||
: ListPromptConstants.Checkbox;
|
||||
|
||||
grid.AddRow(new Markup(indent + prompt + " " + checkbox + " " + text, style));
|
||||
|
Reference in New Issue
Block a user