FIX: Delete-window auto-size (fixes #1667)

This commit is contained in:
Alexander Koblov 2024-06-09 18:30:08 +03:00
commit 193dc62a3a

View file

@ -35,6 +35,8 @@ type
FCommands: TFormCommands;
function GetQueueIdentifier: TOperationsManagerQueueIdentifier;
property {%H-}Commands: TFormCommands read FCommands implements IFormCommands;
protected
procedure DoAutoSize; override;
public
constructor Create(TheOwner: TComponent); override;
constructor Create(TheOwner: TComponent; FileSource: IFileSource); reintroduce;
@ -99,6 +101,16 @@ begin
Result:= FQueueIdentifier;
end;
procedure TfrmButtonForm.DoAutoSize;
begin
inherited DoAutoSize;
if (btnCancel.Left - btnCreateSpecialQueue.BoundsRect.Right) < 16 then
begin
Constraints.MinWidth:= Width + (16 - (btnCancel.Left - btnCreateSpecialQueue.BoundsRect.Right));
end;
end;
constructor TfrmButtonForm.Create(TheOwner: TComponent);
begin
Create(TheOwner, nil);