From 6e24eff9ffc0a841b69425e6c6221477cf871ea8 Mon Sep 17 00:00:00 2001 From: WMJ Date: Sat, 24 Jul 2021 10:31:50 +0800 Subject: [PATCH] + Displayed preview for colors in symbol tooltips --- Codist/Controls/ToolTipFactory.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Codist/Controls/ToolTipFactory.cs b/Codist/Controls/ToolTipFactory.cs index 725b1242..df40d0c1 100644 --- a/Codist/Controls/ToolTipFactory.cs +++ b/Codist/Controls/ToolTipFactory.cs @@ -82,6 +82,12 @@ public static ThemedToolTip CreateToolTip(ISymbol symbol, bool forMemberList, Se ShowXmlDocSummary(symbol, context.SemanticModel.Compilation, tip); } ShowNumericForms(symbol, tip); + if (symbol.Kind == SymbolKind.Property && Config.Instance.SymbolToolTipOptions.MatchFlags(SymbolToolTipOptions.Colors)) { + var preview = QuickInfo.ColorQuickInfo.PreviewColorProperty(symbol as IPropertySymbol, false); + if (preview != null) { + tip.Add(preview); + } + } return tip; }