Skip to content

Commit

Permalink
make ImageNameAvailable visible in all Delphi versions
Browse files Browse the repository at this point in the history
ImageNameAvailable must default to false and be visible even in older Delphi versions for DFM compatibility
  • Loading branch information
UweRaabe committed May 26, 2021
1 parent bacf9d7 commit 60c96e1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Source/PngImageList.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ TPngImageList = class(TImageList, INameMapping)
procedure INameMapping.ListNames = ListImageNames;
private
FEnabledImages: Boolean;
{$IF CompilerVersion >= 34.0 Delphi 10.4 Sydney }
FImageNameAvailable: Boolean;
{$ENDIF}
FLocked: Integer;
FOverlayIndex: array[TOverlay] of Integer;
FPngImages: TPngImageCollectionItems;
Expand Down Expand Up @@ -99,9 +97,7 @@ TPngImageList = class(TImageList, INameMapping)
property ColorDepth default cd32Bit;
property EnabledImages: Boolean read FEnabledImages write SetEnabledImages default True;
property Height read GetHeight write SetHeight default 16;
{$IF CompilerVersion >= 34.0 Delphi 10.4 Sydney }
property ImageNameAvailable: Boolean read FImageNameAvailable write FImageNameAvailable default True;
{$ENDIF}
property ImageNameAvailable: Boolean read FImageNameAvailable write FImageNameAvailable default False;
property PngImages: TPngImageCollectionItems read FPngImages write SetPngImages;
property PngOptions: TPngOptions read FPngOptions write SetPngOptions default [pngBlendOnDisabled];
property Width read GetWidth write SetWidth default 16;
Expand Down Expand Up @@ -398,9 +394,7 @@ constructor TPngImageList.Create(AOwner: TComponent);
{$IF CompilerVersion >= 33.0 Delphi 10.3 Rio }
StoreBitmap := False;
{$ENDIF}
{$IF CompilerVersion >= 34.0 Delphi 10.4 Sydney }
FImageNameAvailable := True;
{$ENDIF}
FImageNameAvailable := False;
ColorDepth := cd32Bit;
if ImageListCount = 0 then
ApplyMethodPatches;
Expand Down

0 comments on commit 60c96e1

Please sign in to comment.