You've already forked lazarus-ccr
* Create check image lists
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4129 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5124,6 +5124,23 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function CreateCheckImageList(CheckKind: TCheckImageKind): TImageList;
|
||||
begin
|
||||
Result := TImageList.Create(nil);
|
||||
Result.Height := 16;
|
||||
Result.Width := 16;
|
||||
Result.AddLazarusResource(CheckImagesStrings[CheckKind], clFuchsia);
|
||||
end;
|
||||
|
||||
function GetCheckImageList(var ImageList: TImageList; CheckKind: TCheckImageKind): TImageList;
|
||||
begin
|
||||
if ImageList = nil then
|
||||
ImageList := CreateCheckImageList(CheckKind);
|
||||
Result := ImageList;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
{$ifdef CPU64}
|
||||
|
||||
@ -5291,6 +5308,8 @@ begin
|
||||
UtilityImages.Transparent := True;
|
||||
UtilityImages.LoadFromLazarusResource('VT_UTILITIES');
|
||||
|
||||
SystemCheckImages := CreateCheckImageList(ckSystemDefault);
|
||||
|
||||
// Delphi (at least version 6 and lower) does not provide a standard split cursor.
|
||||
// Hence we have to load our own.
|
||||
Screen.Cursors[crHeaderSplit] := LoadCursorFromLazarusResource('VT_HEADERSPLIT');
|
||||
@ -12051,9 +12070,6 @@ begin
|
||||
|
||||
FOptions.Free;
|
||||
FreeAndNil(FHeader);
|
||||
|
||||
if FCheckImages <> FCustomCheckImages then
|
||||
FCheckImages.Free;
|
||||
|
||||
FreeMem(FRoot);
|
||||
|
||||
@ -21408,21 +21424,21 @@ class function TBaseVirtualTree.GetCheckImageListFor(Kind: TCheckImageKind): TCu
|
||||
begin
|
||||
case Kind of
|
||||
ckDarkCheck:
|
||||
Result := DarkCheckImages;
|
||||
Result := GetCheckImageList(DarkCheckImages, ckDarkCheck);
|
||||
ckLightTick:
|
||||
Result := LightTickImages;
|
||||
Result := GetCheckImageList(LightTickImages, ckLightTick);
|
||||
ckDarkTick:
|
||||
Result := DarkTickImages;
|
||||
Result := GetCheckImageList(DarkTickImages, ckDarkTick);
|
||||
ckLightCheck:
|
||||
Result := LightCheckImages;
|
||||
Result := GetCheckImageList(LightCheckImages, ckLightCheck);
|
||||
ckFlat:
|
||||
Result := FlatImages;
|
||||
Result := GetCheckImageList(FlatImages, ckFlat);
|
||||
ckXP:
|
||||
Result := XPImages;
|
||||
Result := GetCheckImageList(XPImages, ckXP);
|
||||
ckSystemDefault:
|
||||
Result := SystemCheckImages;
|
||||
Result := GetCheckImageList(SystemCheckImages, ckSystemDefault);
|
||||
ckSystemFlat:
|
||||
Result := SystemFlatCheckImages;
|
||||
Result := GetCheckImageList(SystemFlatCheckImages, ckSystemFlat);
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user