FIX: Blurry icons in viewer/editor/differ (issue #2752)

This commit is contained in:
Alexander Koblov 2026-02-22 16:44:55 +03:00
commit 76d4ba16ec

View file

@ -51,7 +51,7 @@ var
implementation
uses
LCLVersion, Graphics, uPixMapManager, uGlobs;
LCLVersion, Graphics, uPixMapManager, uGlobs, uDCUtils;
{$R *.lfm}
@ -149,6 +149,7 @@ procedure TdmComData.LoadImages(Images: TImageList; const ANames: array of Strin
var
I: Integer;
AName: String;
AFactor: Double;
AResolutions: array of Integer;
ABitmaps: array of TCustomBitmap;
begin
@ -167,6 +168,15 @@ begin
AResolutions[3]:= gToolIconsSize;
end;
AFactor:= findScaleFactorByFirstForm;
if (AFactor > 1.0) then
begin
SetLength(ABitmaps, Length(ABitmaps) + 1);
SetLength(AResolutions, Length(AResolutions) + 1);
AResolutions[High(AResolutions)]:= Round(gToolIconsSize * AFactor);
end;
Images.RegisterResolutions(AResolutions);
for AName in ANames do