From 9c0641eca23f8d6ff67a73f5cf93bc2629466c4a Mon Sep 17 00:00:00 2001 From: Ondrej Pokorny Date: Wed, 28 Sep 2022 22:51:28 +0200 Subject: [PATCH] LCL: rename GetDialogImages.DialogIndexes to DialogGlyphs.DialogIcon --- lcl/dialogres.pas | 10 +++++----- lcl/dialogs.pp | 2 +- lcl/lcltaskdialog.pas | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lcl/dialogres.pas b/lcl/dialogres.pas index 8f068796ae..f8eaed35bd 100644 --- a/lcl/dialogres.pas +++ b/lcl/dialogres.pas @@ -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); diff --git a/lcl/dialogs.pp b/lcl/dialogs.pp index a8cd3b887c..90aea35d60 100644 --- a/lcl/dialogs.pp +++ b/lcl/dialogs.pp @@ -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; diff --git a/lcl/lcltaskdialog.pas b/lcl/lcltaskdialog.pas index 42ebbc2f38..6bda5c3f1d 100644 --- a/lcl/lcltaskdialog.pas +++ b/lcl/lcltaskdialog.pas @@ -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;