mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:29:10 +02:00
LCL: rename GetDialogImages.DialogIndexes to DialogGlyphs.DialogIcon
This commit is contained in:
parent
109d69770c
commit
9c0641eca2
@ -49,15 +49,15 @@ type
|
|||||||
TDialogImageList = class(TLCLGlyphs)
|
TDialogImageList = class(TLCLGlyphs)
|
||||||
private
|
private
|
||||||
fDialogIndexes: array[TDialogImage] of Integer;
|
fDialogIndexes: array[TDialogImage] of Integer;
|
||||||
function GetDialogIndexes(AIndex: TDialogImage): Integer;
|
|
||||||
procedure LoadImage(AIndex: TDialogImage);
|
procedure LoadImage(AIndex: TDialogImage);
|
||||||
|
function GetDialogIcon(AIndex: TDialogImage): Integer;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
public
|
public
|
||||||
property DialogIndexes[AIndex: TDialogImage]: Integer read GetDialogIndexes;
|
property DialogIcon[AIndex: TDialogImage]: Integer read GetDialogIcon;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetDialogImages: TDialogImageList;
|
function DialogGlyphs: TDialogImageList;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ Function LoadIconWithScaleDown( hinst:HINST; pszName:LPCWStr;cx:cint;cy:cint;var
|
|||||||
var
|
var
|
||||||
DialogImages: TDialogImageList;
|
DialogImages: TDialogImageList;
|
||||||
|
|
||||||
function GetDialogImages: TDialogImageList;
|
function DialogGlyphs: TDialogImageList;
|
||||||
begin
|
begin
|
||||||
if not Assigned(DialogImages) then
|
if not Assigned(DialogImages) then
|
||||||
DialogImages := TDialogImageList.Create(nil);
|
DialogImages := TDialogImageList.Create(nil);
|
||||||
@ -96,7 +96,7 @@ begin
|
|||||||
RegisterResolutions([16, 24, 32, 48, 64]);
|
RegisterResolutions([16, 24, 32, 48, 64]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDialogImageList.GetDialogIndexes(AIndex: TDialogImage): Integer;
|
function TDialogImageList.GetDialogIcon(AIndex: TDialogImage): Integer;
|
||||||
begin
|
begin
|
||||||
if fDialogIndexes[AIndex]=-1 then
|
if fDialogIndexes[AIndex]=-1 then
|
||||||
LoadImage(AIndex);
|
LoadImage(AIndex);
|
||||||
|
@ -780,7 +780,7 @@ function ExtractColorIndexAndColor(const AColorList: TStrings; const AIndex: Int
|
|||||||
|
|
||||||
// helper functions (search LCLType for idDiag)
|
// helper functions (search LCLType for idDiag)
|
||||||
function GetDialogCaption(idDiag: Integer): string;
|
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(Option: TOpenOption): string; overload;
|
||||||
function dbgs(Options: TOpenOptions): string; overload;
|
function dbgs(Options: TOpenOptions): string; overload;
|
||||||
|
@ -880,8 +880,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
Image := TImage.Create(Dialog.Form);
|
Image := TImage.Create(Dialog.Form);
|
||||||
Image.Parent := Par;
|
Image.Parent := Par;
|
||||||
Image.Images := GetDialogImages;
|
Image.Images := DialogGlyphs;
|
||||||
Image.ImageIndex := GetDialogImages.DialogIndexes[LCL_IMAGES[aDialogIcon]];
|
Image.ImageIndex := DialogGlyphs.DialogIcon[LCL_IMAGES[aDialogIcon]];
|
||||||
Image.SetBounds(IconBorder,IconBorder, 32, 32);
|
Image.SetBounds(IconBorder,IconBorder, 32, 32);
|
||||||
Image.Stretch := True;
|
Image.Stretch := True;
|
||||||
Image.StretchOutEnabled := False;
|
Image.StretchOutEnabled := False;
|
||||||
@ -1078,9 +1078,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
Image := TImage.Create(Dialog.Form);
|
Image := TImage.Create(Dialog.Form);
|
||||||
Image.Parent := Par;
|
Image.Parent := Par;
|
||||||
Image.Images := GetDialogImages;
|
Image.Images := DialogGlyphs;
|
||||||
Image.ImageWidth := 16;
|
Image.ImageWidth := 16;
|
||||||
Image.ImageIndex := GetDialogImages.DialogIndexes[LCL_FOOTERIMAGES[aFooterIcon]];
|
Image.ImageIndex := DialogGlyphs.DialogIcon[LCL_FOOTERIMAGES[aFooterIcon]];
|
||||||
Image.Stretch := True;
|
Image.Stretch := True;
|
||||||
Image.StretchOutEnabled := False;
|
Image.StretchOutEnabled := False;
|
||||||
Image.Proportional := True;
|
Image.Proportional := True;
|
||||||
|
Loading…
Reference in New Issue
Block a user