From cdd6c381c3a304cece90b016898527b94e1a17dc Mon Sep 17 00:00:00 2001 From: WMJ Date: Wed, 2 Jan 2019 12:03:53 +0800 Subject: [PATCH] - Made text wrap when documentation too long in Super Quick Info --- Codist/Controls/ThemedText.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Codist/Controls/ThemedText.cs b/Codist/Controls/ThemedText.cs index 54c59cfc..b497e2be 100644 --- a/Codist/Controls/ThemedText.cs +++ b/Codist/Controls/ThemedText.cs @@ -49,10 +49,11 @@ public ThemedTipDocument AppendTitle(int imageId, string text) { return this; } public void ApplySizeLimit() { - var w = Config.Instance.QuickInfoMaxWidth - (WpfHelper.IconRightMargin + ThemeHelper.DefaultIconSize + WpfHelper.SmallMarginSize + WpfHelper.SmallMarginSize + 22/*scrollbar width*/); - if (w <= 0) { - return; + var w = Config.Instance.QuickInfoMaxWidth; + if (w == 0) { + w = Application.Current.MainWindow.RenderSize.Width; } + w = w - (WpfHelper.IconRightMargin + ThemeHelper.DefaultIconSize + WpfHelper.SmallMarginSize + WpfHelper.SmallMarginSize + 22/*scrollbar width*/); foreach (var item in Children) { var r = item as ThemedTipParagraph; if (r != null) {