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;
|
||||||
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}
|
{$ifdef CPU64}
|
||||||
|
|
||||||
@@ -5291,6 +5308,8 @@ begin
|
|||||||
UtilityImages.Transparent := True;
|
UtilityImages.Transparent := True;
|
||||||
UtilityImages.LoadFromLazarusResource('VT_UTILITIES');
|
UtilityImages.LoadFromLazarusResource('VT_UTILITIES');
|
||||||
|
|
||||||
|
SystemCheckImages := CreateCheckImageList(ckSystemDefault);
|
||||||
|
|
||||||
// Delphi (at least version 6 and lower) does not provide a standard split cursor.
|
// Delphi (at least version 6 and lower) does not provide a standard split cursor.
|
||||||
// Hence we have to load our own.
|
// Hence we have to load our own.
|
||||||
Screen.Cursors[crHeaderSplit] := LoadCursorFromLazarusResource('VT_HEADERSPLIT');
|
Screen.Cursors[crHeaderSplit] := LoadCursorFromLazarusResource('VT_HEADERSPLIT');
|
||||||
@@ -12051,9 +12070,6 @@ begin
|
|||||||
|
|
||||||
FOptions.Free;
|
FOptions.Free;
|
||||||
FreeAndNil(FHeader);
|
FreeAndNil(FHeader);
|
||||||
|
|
||||||
if FCheckImages <> FCustomCheckImages then
|
|
||||||
FCheckImages.Free;
|
|
||||||
|
|
||||||
FreeMem(FRoot);
|
FreeMem(FRoot);
|
||||||
|
|
||||||
@@ -21408,21 +21424,21 @@ class function TBaseVirtualTree.GetCheckImageListFor(Kind: TCheckImageKind): TCu
|
|||||||
begin
|
begin
|
||||||
case Kind of
|
case Kind of
|
||||||
ckDarkCheck:
|
ckDarkCheck:
|
||||||
Result := DarkCheckImages;
|
Result := GetCheckImageList(DarkCheckImages, ckDarkCheck);
|
||||||
ckLightTick:
|
ckLightTick:
|
||||||
Result := LightTickImages;
|
Result := GetCheckImageList(LightTickImages, ckLightTick);
|
||||||
ckDarkTick:
|
ckDarkTick:
|
||||||
Result := DarkTickImages;
|
Result := GetCheckImageList(DarkTickImages, ckDarkTick);
|
||||||
ckLightCheck:
|
ckLightCheck:
|
||||||
Result := LightCheckImages;
|
Result := GetCheckImageList(LightCheckImages, ckLightCheck);
|
||||||
ckFlat:
|
ckFlat:
|
||||||
Result := FlatImages;
|
Result := GetCheckImageList(FlatImages, ckFlat);
|
||||||
ckXP:
|
ckXP:
|
||||||
Result := XPImages;
|
Result := GetCheckImageList(XPImages, ckXP);
|
||||||
ckSystemDefault:
|
ckSystemDefault:
|
||||||
Result := SystemCheckImages;
|
Result := GetCheckImageList(SystemCheckImages, ckSystemDefault);
|
||||||
ckSystemFlat:
|
ckSystemFlat:
|
||||||
Result := SystemFlatCheckImages;
|
Result := GetCheckImageList(SystemFlatCheckImages, ckSystemFlat);
|
||||||
else
|
else
|
||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user