Browse Source

Revert "Improve TNewLinkLabel.AdjustHeight." Closes #462.

Martijn Laan 1 year ago
parent
commit
9cb27224ca
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Components/BidiCtrls.pas

+ 3 - 3
Components/BidiCtrls.pas

@@ -139,9 +139,9 @@ end;
 function TNewLinkLabel.AdjustHeight: Integer;
 function TNewLinkLabel.AdjustHeight: Integer;
 begin
 begin
   var OldHeight := Height;
   var OldHeight := Height;
-  var IdealHeight := SendMessage(Handle, LM_GETIDEALHEIGHT, 0, 0);
-  if IdealHeight <> 0 then
-    Height := IdealHeight;
+  var IdealSize: TSize;
+  SendMessage(Handle, LM_GETIDEALSIZE, Width, LPARAM(@IdealSize));
+  Height := IdealSize.cy;
   Result := Height - OldHeight;
   Result := Height - OldHeight;
 end;
 end;