Quellcode durchsuchen

Scaling Hint popup width

Source commit: 425a458fc837e6e70917bb05b323232903374673
Martin Prikryl vor 10 Jahren
Ursprung
Commit
7445cb70e6
1 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen
  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;
   }
 }
 //---------------------------------------------------------------------------