Visitar URL original
UPD: Use icons from image list · doublecmd/doublecmd@48fa157 · GitHub
Skip to content

Commit 48fa157

Browse files
committed
UPD: Use icons from image list
(cherry picked from commit 2b8a209)
1 parent 1410099 commit 48fa157

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

‎src/fFindDlg.lfm‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ object frmFindDlg: TfrmFindDlg
425425
Width = 24
426426
Anchors = [akTop, akLeft, akBottom]
427427
BorderSpacing.Left = 2
428+
Images = dmComData.ilEditorImages
429+
ImageIndex = 44
428430
TabOrder = 8
429431
TabStop = True
430432
OnClick = btnEncodingClick

‎src/fFindDlg.pas‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,9 @@ implementation
399399
{$R *.lfm}
400400

401401
uses
402-
LCLProc, LCLType, LConvEncoding, StrUtils, HelpIntfs, fViewer, fMain,
402+
LCLProc, LCLType, LConvEncoding, StrUtils, HelpIntfs, ImgList, fViewer, fMain,
403403
uLng, uGlobs, uShowForm, uDCUtils, uOfficeXML,
404-
uFile, uFileProperty, uColumnsFileView,
404+
uFile, uFileProperty, uColumnsFileView,
405405
uFileViewNotebook, uKeyboard, uOSUtils,
406406
DCOSUtils, uRegExprA, uRegExprW, uDebug, uShowMsg, uConvEncoding,
407407
uColumns, uFileFunctions, uFileSorting,
@@ -768,8 +768,6 @@ procedure TfrmFindDlg.cmbEncodingSelect(Sender: TObject);
768768

769769
{ TfrmFindDlg.Create }
770770
constructor TfrmFindDlg.Create(TheOwner: TComponent);
771-
var
772-
C: TPortableNetworkGraphic;
773771
begin
774772
FSelectedFiles := TStringList.Create;
775773
inherited Create(TheOwner);
@@ -778,15 +776,8 @@ constructor TfrmFindDlg.Create(TheOwner: TComponent);
778776
FUpdateTimer.Enabled := False;
779777
FUpdateTimer.OnTimer := @OnUpdateTimer;
780778

781-
try
782-
C := TPortableNetworkGraphic.Create;
783-
C.LoadFromResourceName(hInstance, ResBtnSelDir);
784-
btnChooseFolder.Glyph.Assign(C);
785-
finally
786-
C.Free;
787-
end;
788-
789-
dmComData.ilEditorImages.GetBitmap(44, btnEncoding.Glyph);
779+
btnChooseFolder.Images:= LCLGlyphs;
780+
btnChooseFolder.ImageIndex:= LCLGlyphs.GetImageIndex(ResBtnSelDir);
790781

791782
FCommands := TFormCommands.Create(Self, actList);
792783
end;

0 commit comments

Comments
 (0)