mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-07 21:17:15 +08:00
Add an implicit operator to convert from Color to Style (#1160)
This commit is contained in:
@ -225,7 +225,7 @@ public sealed class MultiSelectionPrompt<T> : IPrompt<List<T>>, IListPromptStrat
|
||||
IRenderable IListPromptStrategy<T>.Render(IAnsiConsole console, bool scrollable, int cursorIndex, IEnumerable<(int Index, ListPromptItem<T> Node)> items)
|
||||
{
|
||||
var list = new List<IRenderable>();
|
||||
var highlightStyle = HighlightStyle ?? new Style(foreground: Color.Blue);
|
||||
var highlightStyle = HighlightStyle ?? Color.Blue;
|
||||
|
||||
if (Title != null)
|
||||
{
|
||||
|
@ -137,8 +137,8 @@ public sealed class SelectionPrompt<T> : IPrompt<T>, IListPromptStrategy<T>
|
||||
IRenderable IListPromptStrategy<T>.Render(IAnsiConsole console, bool scrollable, int cursorIndex, IEnumerable<(int Index, ListPromptItem<T> Node)> items)
|
||||
{
|
||||
var list = new List<IRenderable>();
|
||||
var disabledStyle = DisabledStyle ?? new Style(foreground: Color.Grey);
|
||||
var highlightStyle = HighlightStyle ?? new Style(foreground: Color.Blue);
|
||||
var disabledStyle = DisabledStyle ?? Color.Grey;
|
||||
var highlightStyle = HighlightStyle ?? Color.Blue;
|
||||
|
||||
if (Title != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user