LCL: rename GetDialogImages.DialogIndexes to DialogGlyphs.DialogIcon

This commit is contained in:
Ondrej Pokorny 2022-09-28 22:51:28 +02:00
parent 109d69770c
commit 9c0641eca2
3 changed files with 10 additions and 10 deletions

View File

@ -49,15 +49,15 @@ type
TDialogImageList = class(TLCLGlyphs)
private
fDialogIndexes: array[TDialogImage] of Integer;
function GetDialogIndexes(AIndex: TDialogImage): Integer;
procedure LoadImage(AIndex: TDialogImage);
function GetDialogIcon(AIndex: TDialogImage): Integer;
public
constructor Create(AOwner: TComponent); override;
public
property DialogIndexes[AIndex: TDialogImage]: Integer read GetDialogIndexes;
property DialogIcon[AIndex: TDialogImage]: Integer read GetDialogIcon;
end;
function GetDialogImages: TDialogImageList;
function DialogGlyphs: TDialogImageList;
implementation
@ -73,7 +73,7 @@ Function LoadIconWithScaleDown( hinst:HINST; pszName:LPCWStr;cx:cint;cy:cint;var
var
DialogImages: TDialogImageList;
function GetDialogImages: TDialogImageList;
function DialogGlyphs: TDialogImageList;
begin
if not Assigned(DialogImages) then
DialogImages := TDialogImageList.Create(nil);
@ -96,7 +96,7 @@ begin
RegisterResolutions([16, 24, 32, 48, 64]);
end;
function TDialogImageList.GetDialogIndexes(AIndex: TDialogImage): Integer;
function TDialogImageList.GetDialogIcon(AIndex: TDialogImage): Integer;
begin
if fDialogIndexes[AIndex]=-1 then
LoadImage(AIndex);

View File

@ -780,7 +780,7 @@ function ExtractColorIndexAndColor(const AColorList: TStrings; const AIndex: Int
// helper functions (search LCLType for idDiag)
function GetDialogCaption(idDiag: Integer): string;
function GetDialogIcon(idDiag: Integer): TCustomBitmap; deprecated 'Use DialogRes.GetDialogImages';
function GetDialogIcon(idDiag: Integer): TCustomBitmap; deprecated 'Use DialogRes.DialogGlyphs';
function dbgs(Option: TOpenOption): string; overload;
function dbgs(Options: TOpenOptions): string; overload;

View File

@ -880,8 +880,8 @@ begin
begin
Image := TImage.Create(Dialog.Form);
Image.Parent := Par;
Image.Images := GetDialogImages;
Image.ImageIndex := GetDialogImages.DialogIndexes[LCL_IMAGES[aDialogIcon]];
Image.Images := DialogGlyphs;
Image.ImageIndex := DialogGlyphs.DialogIcon[LCL_IMAGES[aDialogIcon]];
Image.SetBounds(IconBorder,IconBorder, 32, 32);
Image.Stretch := True;
Image.StretchOutEnabled := False;
@ -1078,9 +1078,9 @@ begin
begin
Image := TImage.Create(Dialog.Form);
Image.Parent := Par;
Image.Images := GetDialogImages;
Image.Images := DialogGlyphs;
Image.ImageWidth := 16;
Image.ImageIndex := GetDialogImages.DialogIndexes[LCL_FOOTERIMAGES[aFooterIcon]];
Image.ImageIndex := DialogGlyphs.DialogIcon[LCL_FOOTERIMAGES[aFooterIcon]];
Image.Stretch := True;
Image.StretchOutEnabled := False;
Image.Proportional := True;