FIX: file icon issue in FileProperties Form (#868)

This commit is contained in:
rich2014 2023-03-18 18:05:16 +08:00 committed by GitHub
commit 3d73cf4fb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -64,6 +64,7 @@ object frmFileProperties: TfrmFileProperties
Height = 32
Top = 0
Width = 32
Stretch = True
end
end
object lblFileName: TLabel

View file

@ -174,6 +174,8 @@ begin
end;
constructor TfrmFileProperties.Create(AOwner: TComponent; aFileSource: IFileSource; theFiles: TFiles);
var
size: Integer;
begin
FExif:= TExifReader.Create;
FFileSource:= aFileSource;
@ -183,8 +185,10 @@ begin
inherited Create(AOwner);
imgFileIcon.Width:= gIconsSize;
imgFileIcon.Height:= gIconsSize;
size:= gIconsSize * round( Application.MainForm.GetCanvasScaleFactor );
if size > 48 then size:= 48;
imgFileIcon.Width:= size;
imgFileIcon.Height:= size;
end;
destructor TfrmFileProperties.Destroy;