浏览代码

Scaling Hint popup width

Source commit: 425a458fc837e6e70917bb05b323232903374673
Martin Prikryl 9 年之前
父节点
当前提交
7445cb70e6
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      source/windows/TerminalManager.cpp

+ 8 - 1
source/windows/TerminalManager.cpp

@@ -778,7 +778,14 @@ void __fastcall TTerminalManager::ApplicationShowHint(UnicodeString & HintStr,
   }
   else
   {
-    HintInfo.HintMaxWidth = 300;
+    int HintMaxWidth = 300;
+
+    if (DebugAlwaysTrue(HintInfo.HintControl != NULL))
+    {
+      HintMaxWidth = ScaleByTextHeight(HintInfo.HintControl, HintMaxWidth);
+    }
+
+    HintInfo.HintMaxWidth = HintMaxWidth;
   }
 }
 //---------------------------------------------------------------------------