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:
Davide Piccinini
2024-09-09 16:35:01 +02:00
committed by GitHub
parent f8a4b2271d
commit a55b80220d
4 changed files with 20 additions and 10 deletions

View File

@ -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));