mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: GetCustomIcon() in SearchResultFileSource
This commit is contained in:
parent
529c9a1fc7
commit
f75fbdaecf
2 changed files with 25 additions and 1 deletions
BIN
pixmaps/macOS/magnifyingglass.png
Normal file
BIN
pixmaps/macOS/magnifyingglass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
|
|
@ -11,7 +11,11 @@ uses
|
|||
uMultiListFileSource,
|
||||
uFileSourceOperationTypes,
|
||||
uFileSourceOperation,
|
||||
uFileSourceProperty;
|
||||
uFileSourceProperty
|
||||
{$IFDEF DARWIN}
|
||||
,Graphics, uPixMapManager, uDCUtils
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
type
|
||||
|
||||
|
|
@ -38,6 +42,8 @@ type
|
|||
function CreateListOperation(TargetPath: String): TFileSourceOperation; override;
|
||||
|
||||
function GetLocalName(var aFile: TFile): Boolean; override;
|
||||
|
||||
function GetCustomIcon(const path: String; const iconSize: Integer): TBitmap; override; overload;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
|
@ -119,6 +125,24 @@ begin
|
|||
Result:= True;
|
||||
end;
|
||||
|
||||
function TSearchResultFileSource.GetCustomIcon(
|
||||
const path: String;
|
||||
const iconSize: Integer ): TBitmap;
|
||||
{$IFDEF DARWIN}
|
||||
const
|
||||
ICON_PATH = '$COMMANDER_PATH/pixmaps/macOS/magnifyingglass.png';
|
||||
var
|
||||
iconPath: String;
|
||||
begin
|
||||
iconPath:= mbExpandFileName( ICON_PATH );
|
||||
PixMapManager.LoadBitmapFromFile( iconPath, Result );
|
||||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
Result:= nil;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
initialization
|
||||
searchResultFileSourceProcessor:= TSearchResultFileSourceProcessor.Create;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue