Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warp QuickInfo text #1981

Merged
merged 1 commit into from
Dec 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions vsintegration/src/FSharp.Editor/QuickInfoProvider.fs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ open System.Windows.Documents
type internal FSharpDeferredQuickInfoContent(content: string, textProperties: TextFormattingRunProperties) =
interface IDeferredQuickInfoContent with
override this.Create() : FrameworkElement =
let label = Label(Content = content)
label.SetValue(TextElement.BackgroundProperty, textProperties.BackgroundBrush)
label.SetValue(TextElement.ForegroundProperty, textProperties.ForegroundBrush)
label.SetValue(TextElement.FontFamilyProperty, textProperties.Typeface.FontFamily)
label.SetValue(TextElement.FontSizeProperty, textProperties.FontRenderingEmSize)
label.SetValue(TextElement.FontStyleProperty, if textProperties.Italic then FontStyles.Italic else FontStyles.Normal)
label.SetValue(TextElement.FontWeightProperty, if textProperties.Bold then FontWeights.Bold else FontWeights.Normal)
upcast label
let textBlock = TextBlock(Run(content), TextWrapping = TextWrapping.Wrap, TextTrimming = TextTrimming.None)
textBlock.SetValue(TextElement.BackgroundProperty, textProperties.BackgroundBrush)
textBlock.SetValue(TextElement.ForegroundProperty, textProperties.ForegroundBrush)
textBlock.SetValue(TextElement.FontFamilyProperty, textProperties.Typeface.FontFamily)
textBlock.SetValue(TextElement.FontSizeProperty, textProperties.FontRenderingEmSize)
textBlock.SetValue(TextElement.FontStyleProperty, if textProperties.Italic then FontStyles.Italic else FontStyles.Normal)
textBlock.SetValue(TextElement.FontWeightProperty, if textProperties.Bold then FontWeights.Bold else FontWeights.Normal)
upcast textBlock

[<Shared>]
[<ExportQuickInfoProvider(PredefinedQuickInfoProviderNames.Semantic, FSharpCommonConstants.FSharpLanguageName)>]
Expand Down