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) {