mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: apply TDarwinImageUtil.getBestFromFileContentWithSize() in iCloudDrive
This commit is contained in:
parent
58a09913c9
commit
f7ca812c3c
2 changed files with 4 additions and 9 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5 KiB |
|
|
@ -502,18 +502,13 @@ end;
|
|||
|
||||
procedure TiCloudDriveUIHandler.createImages;
|
||||
var
|
||||
tempImage: NSImage;
|
||||
path: String;
|
||||
begin
|
||||
_downloadImage.release;
|
||||
tempImage:= NSImage.alloc.initWithContentsOfFile( StrToNSString(mbExpandFileName(iCloudDriveConfig.icon.download)) );
|
||||
tempImage.setSize( NSMakeSize(16,16) );
|
||||
if TCocoaThemeServices.isDark then begin
|
||||
_downloadImage:= TDarwinImageUtil.invertColor( tempImage );
|
||||
end else begin
|
||||
_downloadImage:= tempImage;
|
||||
end;
|
||||
path:= mbExpandFileName(iCloudDriveConfig.icon.download);
|
||||
_downloadImage:= TDarwinImageUtil.getBestFromFileContentWithSize( path, 16, True );
|
||||
_downloadImage.setSize( NSMakeSize(16,16) );
|
||||
_downloadImage.retain;
|
||||
tempImage.release;
|
||||
end;
|
||||
|
||||
procedure TiCloudDriveUIHandler.releaseImages;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue