Browse Source

Scaling Hint popup width

Source commit: 425a458fc837e6e70917bb05b323232903374673
Martin Prikryl 10 years ago
parent
commit
7445cb70e6
1 changed files with 8 additions and 1 deletions
  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;
   }
 }
 //---------------------------------------------------------------------------