Skip to content

Commit fe42aaa

Browse files
committed
completion description - use non-monospace for docs
1 parent 3db3f9c commit fe42aaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SharpIDE.Godot/Features/CodeEditor/CompletionDescriptionTooltip.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@ public static RichTextLabel WriteToCompletionDescriptionLabel(RichTextLabel labe
1111
{
1212
var quickInfoElements = completionDescription.TaggedParts.ToInteractiveTextElements(null);
1313
label.PushColor(TextEditorDotnetColoursDark.White);
14-
label.PushFont(MonospaceFont);
1514
foreach (var quickInfoElement in quickInfoElements)
1615
{
1716
WriteQuickInfoElement(label, quickInfoElement, editorThemeColorSet);
1817
}
19-
//label.AddNamespace(symbol);
20-
label.Pop(); // font
2118
label.Pop(); // color
2219
return label;
2320
}
@@ -31,8 +28,11 @@ private static void WriteQuickInfoElement(RichTextLabel label, QuickInfoElement
3128
{
3229
var colour = ClassificationToColorMapper.GetColorForClassification(editorThemeColorSet, quickInfoClassifiedTextRun.ClassificationTypeName);
3330
label.PushColor(colour);
31+
var isMonospace = quickInfoClassifiedTextRun.ClassificationTypeName is not ("text" or "whitespace");
32+
if (isMonospace) label.PushFont(MonospaceFont);
3433
label.AddText(quickInfoClassifiedTextRun.Text);
3534
label.Pop();
35+
if (isMonospace) label.Pop();
3636
}
3737
break;
3838
case QuickInfoContainerElement containerElement:

0 commit comments

Comments
 (0)