mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 20:59:06 +02:00
ide: add ability to scroll icon images in project options
git-svn-id: trunk@17066 -
This commit is contained in:
parent
c29b56e233
commit
99d8fe4631
@ -1484,6 +1484,8 @@ resourcestring
|
|||||||
dlgPOLoadIcon = 'Load Icon';
|
dlgPOLoadIcon = 'Load Icon';
|
||||||
dlgPOSaveIcon = 'Save Icon';
|
dlgPOSaveIcon = 'Save Icon';
|
||||||
dlgPOClearIcon = 'Clear Icon';
|
dlgPOClearIcon = 'Clear Icon';
|
||||||
|
dlgPOIconDesc = '(size: %d:%d, bpp: %d)';
|
||||||
|
dlgPOIconDescNone = '(none)';
|
||||||
|
|
||||||
dlgAutoCreateForms = 'Auto-create forms:';
|
dlgAutoCreateForms = 'Auto-create forms:';
|
||||||
dlgAvailableForms = 'Available forms:';
|
dlgAvailableForms = 'Available forms:';
|
||||||
|
1943
ide/projectopts.lfm
1943
ide/projectopts.lfm
File diff suppressed because it is too large
Load Diff
1178
ide/projectopts.lrs
1178
ide/projectopts.lrs
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,7 @@ uses
|
|||||||
IDEWindowIntf, IDEImagesIntf, ProjectIntf, IDEDialogs,
|
IDEWindowIntf, IDEImagesIntf, ProjectIntf, IDEDialogs,
|
||||||
IDEOptionDefs, LazarusIDEStrConsts, Project, IDEProcs, W32VersionInfo,
|
IDEOptionDefs, LazarusIDEStrConsts, Project, IDEProcs, W32VersionInfo,
|
||||||
VersionInfoAdditionalInfo, W32Manifest, ApplicationBundle, ExtDlgs,
|
VersionInfoAdditionalInfo, W32Manifest, ApplicationBundle, ExtDlgs,
|
||||||
ButtonPanel;
|
ButtonPanel, ComCtrls;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -53,6 +53,7 @@ type
|
|||||||
Bevel1: TBevel;
|
Bevel1: TBevel;
|
||||||
ButtonPanel: TButtonPanel;
|
ButtonPanel: TButtonPanel;
|
||||||
ClearIconButton: TBitBtn;
|
ClearIconButton: TBitBtn;
|
||||||
|
IconTrackLabel: TLabel;
|
||||||
SaveIconButton: TBitBtn;
|
SaveIconButton: TBitBtn;
|
||||||
LoadIconButton: TBitBtn;
|
LoadIconButton: TBitBtn;
|
||||||
CopyrightLabel: TLabel;
|
CopyrightLabel: TLabel;
|
||||||
@ -76,6 +77,7 @@ type
|
|||||||
SavePage: TPage;
|
SavePage: TPage;
|
||||||
SavePictureDialog1: TSavePictureDialog;
|
SavePictureDialog1: TSavePictureDialog;
|
||||||
TitleLabel: TLabel;
|
TitleLabel: TLabel;
|
||||||
|
IconTrack: TTrackBar;
|
||||||
VersionInfoPage: TPage;
|
VersionInfoPage: TPage;
|
||||||
i18nPage: TPage;
|
i18nPage: TPage;
|
||||||
|
|
||||||
@ -145,7 +147,6 @@ type
|
|||||||
I18NGroupBox: TGroupBox;
|
I18NGroupBox: TGroupBox;
|
||||||
PoOutDirLabel: TLabel;
|
PoOutDirLabel: TLabel;
|
||||||
|
|
||||||
|
|
||||||
procedure AdditionalInfoButtonClick(Sender: TObject);
|
procedure AdditionalInfoButtonClick(Sender: TObject);
|
||||||
procedure ClearIconButtonClick(Sender: TObject);
|
procedure ClearIconButtonClick(Sender: TObject);
|
||||||
procedure CreateAppBundleButtonClick(Sender: TObject);
|
procedure CreateAppBundleButtonClick(Sender: TObject);
|
||||||
@ -153,6 +154,8 @@ type
|
|||||||
procedure FormsPageContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean);
|
procedure FormsPageContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean);
|
||||||
procedure FormsPageResize(Sender: TObject);
|
procedure FormsPageResize(Sender: TObject);
|
||||||
procedure HelpButtonClick(Sender: TObject);
|
procedure HelpButtonClick(Sender: TObject);
|
||||||
|
procedure IconImagePictureChanged(Sender: TObject);
|
||||||
|
procedure IconTrackChange(Sender: TObject);
|
||||||
procedure LazDocAddPathButtonClick(Sender: TObject);
|
procedure LazDocAddPathButtonClick(Sender: TObject);
|
||||||
procedure LazDocBrowseButtonClick(Sender: TObject);
|
procedure LazDocBrowseButtonClick(Sender: TObject);
|
||||||
procedure LazDocDeletePathButtonClick(Sender: TObject);
|
procedure LazDocDeletePathButtonClick(Sender: TObject);
|
||||||
@ -303,6 +306,7 @@ begin
|
|||||||
LoadIconButton.LoadGlyphFromLazarusResource('open');
|
LoadIconButton.LoadGlyphFromLazarusResource('open');
|
||||||
SaveIconButton.LoadGlyphFromLazarusResource('menu_save');
|
SaveIconButton.LoadGlyphFromLazarusResource('menu_save');
|
||||||
ClearIconButton.LoadGlyphFromLazarusResource('menu_clean');
|
ClearIconButton.LoadGlyphFromLazarusResource('menu_clean');
|
||||||
|
IconImagePictureChanged(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectOptionsDialog.SetupLazDocPage(PageIndex: Integer);
|
procedure TProjectOptionsDialog.SetupLazDocPage(PageIndex: Integer);
|
||||||
@ -575,6 +579,31 @@ begin
|
|||||||
ShowContextHelpForIDE(Self);
|
ShowContextHelpForIDE(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TProjectOptionsDialog.IconImagePictureChanged(Sender: TObject);
|
||||||
|
var
|
||||||
|
HasIcon: Boolean;
|
||||||
|
cx, cy: integer;
|
||||||
|
begin
|
||||||
|
HasIcon := (IconImage.Picture.Graphic <> nil) and
|
||||||
|
(not IconImage.Picture.Graphic.Empty);
|
||||||
|
IconTrack.Enabled := HasIcon;
|
||||||
|
if HasIcon then
|
||||||
|
begin
|
||||||
|
IconTrack.Min := 0;
|
||||||
|
IconTrack.Max := IconImage.Picture.Icon.Count - 1;
|
||||||
|
IconTrack.Position := IconImage.Picture.Icon.Current;
|
||||||
|
IconImage.Picture.Icon.GetSize(cx, cy);
|
||||||
|
IconTrackLabel.Caption := Format(dlgPOIconDesc, [cx, cy, PIXELFORMAT_BPP[IconImage.Picture.Icon.PixelFormat]]);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
IconTrackLabel.Caption := dlgPOIconDescNone;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TProjectOptionsDialog.IconTrackChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
IconImage.Picture.Icon.Current := IconTrack.Position;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TProjectOptionsDialog.FormsPageResize(Sender: TObject);
|
procedure TProjectOptionsDialog.FormsPageResize(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
with FormsAutoCreatedListBox do
|
with FormsAutoCreatedListBox do
|
||||||
|
Loading…
Reference in New Issue
Block a user