mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:19:26 +02:00
ide: add a button to restore default project icon
git-svn-id: trunk@43010 -
This commit is contained in:
parent
5da511836b
commit
8a831f63e9
@ -6,27 +6,27 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
ClientHeight = 425
|
||||
ClientWidth = 522
|
||||
TabOrder = 0
|
||||
DesignLeft = 411
|
||||
DesignTop = 290
|
||||
DesignLeft = 1197
|
||||
DesignTop = 317
|
||||
object AppSettingsGroupBox: TGroupBox
|
||||
Left = 0
|
||||
Height = 352
|
||||
Height = 356
|
||||
Top = 0
|
||||
Width = 522
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
Caption = 'AppSettingsGroupBox'
|
||||
ClientHeight = 330
|
||||
ClientWidth = 514
|
||||
ClientHeight = 338
|
||||
ClientWidth = 518
|
||||
TabOrder = 0
|
||||
object TitleLabel: TLabel
|
||||
AnchorSideLeft.Control = AppSettingsGroupBox
|
||||
AnchorSideTop.Control = TitleEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 9
|
||||
Width = 61
|
||||
Height = 15
|
||||
Top = 10
|
||||
Width = 51
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'TitleLabel'
|
||||
ParentColor = False
|
||||
@ -35,9 +35,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideLeft.Control = AppSettingsGroupBox
|
||||
AnchorSideTop.Control = IconPanel
|
||||
Left = 6
|
||||
Height = 16
|
||||
Top = 34
|
||||
Width = 60
|
||||
Height = 15
|
||||
Top = 35
|
||||
Width = 51
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'IconLabel'
|
||||
ParentColor = False
|
||||
@ -49,9 +49,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = IconTrack
|
||||
Left = 240
|
||||
Height = 16
|
||||
Top = 174
|
||||
Width = 95
|
||||
Height = 15
|
||||
Top = 176
|
||||
Width = 80
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'IconTrackLabel'
|
||||
@ -59,9 +59,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
end
|
||||
object TitleEdit: TEdit
|
||||
Left = 106
|
||||
Height = 22
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 402
|
||||
Width = 406
|
||||
Align = alTop
|
||||
BorderSpacing.Left = 100
|
||||
BorderSpacing.Around = 6
|
||||
@ -73,9 +73,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Control = IconTrack
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 208
|
||||
Width = 174
|
||||
Height = 19
|
||||
Top = 209
|
||||
Width = 150
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'UseAppBundleCheckBox'
|
||||
TabOrder = 6
|
||||
@ -85,9 +85,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Control = UseAppBundleCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 232
|
||||
Width = 174
|
||||
Height = 19
|
||||
Top = 234
|
||||
Width = 151
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'UseXPManifestCheckBox'
|
||||
OnChange = UseXPManifestCheckBoxChange
|
||||
@ -99,7 +99,7 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 106
|
||||
Height = 128
|
||||
Top = 34
|
||||
Top = 35
|
||||
Width = 128
|
||||
BorderSpacing.Left = 106
|
||||
BorderSpacing.Top = 6
|
||||
@ -107,14 +107,14 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
BevelOuter = bvNone
|
||||
BorderWidth = 1
|
||||
BorderStyle = bsSingle
|
||||
ClientHeight = 128
|
||||
ClientWidth = 128
|
||||
ClientHeight = 124
|
||||
ClientWidth = 124
|
||||
TabOrder = 1
|
||||
object IconImage: TImage
|
||||
Left = 1
|
||||
Height = 126
|
||||
Height = 122
|
||||
Top = 1
|
||||
Width = 126
|
||||
Width = 122
|
||||
Align = alClient
|
||||
Center = True
|
||||
OnPictureChanged = IconImagePictureChanged
|
||||
@ -127,9 +127,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideBottom.Control = IconPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 240
|
||||
Height = 22
|
||||
Top = 34
|
||||
Width = 123
|
||||
Height = 25
|
||||
Top = 35
|
||||
Width = 111
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'LoadIconButton'
|
||||
@ -138,12 +138,12 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
end
|
||||
object SaveIconButton: TBitBtn
|
||||
AnchorSideLeft.Control = LoadIconButton
|
||||
AnchorSideTop.Control = LoadIconButton
|
||||
AnchorSideTop.Control = DefaultIconButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 240
|
||||
Height = 22
|
||||
Top = 62
|
||||
Width = 120
|
||||
Height = 25
|
||||
Top = 97
|
||||
Width = 109
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'SaveIconButton'
|
||||
@ -155,9 +155,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Control = SaveIconButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 240
|
||||
Height = 22
|
||||
Top = 90
|
||||
Width = 125
|
||||
Height = 25
|
||||
Top = 128
|
||||
Width = 112
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'ClearIconButton'
|
||||
@ -172,7 +172,7 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 106
|
||||
Height = 40
|
||||
Top = 162
|
||||
Top = 163
|
||||
Width = 128
|
||||
Max = 0
|
||||
OnChange = IconTrackChange
|
||||
@ -186,9 +186,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Control = UseXPManifestCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 27
|
||||
Height = 18
|
||||
Top = 256
|
||||
Width = 143
|
||||
Height = 19
|
||||
Top = 259
|
||||
Width = 123
|
||||
BorderSpacing.Left = 15
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'DpiAwareCheckBox'
|
||||
@ -199,9 +199,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Control = ExecutionLevelComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 27
|
||||
Height = 18
|
||||
Top = 306
|
||||
Width = 138
|
||||
Height = 19
|
||||
Top = 313
|
||||
Width = 119
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'UIAccessCheckBox'
|
||||
@ -212,12 +212,12 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DpiAwareCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 160
|
||||
Height = 20
|
||||
Top = 280
|
||||
Left = 139
|
||||
Height = 23
|
||||
Top = 284
|
||||
Width = 223
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
Style = csDropDownList
|
||||
TabOrder = 9
|
||||
end
|
||||
@ -226,23 +226,37 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
|
||||
AnchorSideTop.Control = ExecutionLevelComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 27
|
||||
Height = 16
|
||||
Top = 282
|
||||
Width = 127
|
||||
Height = 15
|
||||
Top = 288
|
||||
Width = 106
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'ExecutionLevelLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object DefaultIconButton: TButton
|
||||
AnchorSideLeft.Control = LoadIconButton
|
||||
AnchorSideTop.Control = LoadIconButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 240
|
||||
Height = 25
|
||||
Top = 66
|
||||
Width = 123
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'DefaultIconButton'
|
||||
OnClick = DefaultIconButtonClick
|
||||
TabOrder = 11
|
||||
end
|
||||
end
|
||||
object CreateAppBundleButton: TBitBtn
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = AppSettingsGroupBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 358
|
||||
Width = 175
|
||||
Height = 25
|
||||
Top = 362
|
||||
Width = 155
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'CreateAppBundleButton'
|
||||
|
@ -16,6 +16,7 @@ type
|
||||
|
||||
TProjectApplicationOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
AppSettingsGroupBox: TGroupBox;
|
||||
DefaultIconButton: TButton;
|
||||
UIAccessCheckBox: TCheckBox;
|
||||
ExecutionLevelComboBox: TComboBox;
|
||||
DpiAwareCheckBox: TCheckBox;
|
||||
@ -37,6 +38,7 @@ type
|
||||
UseXPManifestCheckBox: TCheckBox;
|
||||
procedure ClearIconButtonClick(Sender: TObject);
|
||||
procedure CreateAppBundleButtonClick(Sender: TObject);
|
||||
procedure DefaultIconButtonClick(Sender: TObject);
|
||||
procedure IconImagePictureChanged(Sender: TObject);
|
||||
procedure IconTrackChange(Sender: TObject);
|
||||
procedure LoadIconButtonClick(Sender: TObject);
|
||||
@ -141,6 +143,11 @@ begin
|
||||
CreateProjectApplicationBundle(FProject);
|
||||
end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.DefaultIconButtonClick(Sender: TObject);
|
||||
begin
|
||||
IconImage.Picture.Icon.LoadFromResourceName(HInstance, 'MAINICONPROJECT');
|
||||
end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.LoadIconButtonClick(Sender: TObject);
|
||||
begin
|
||||
if OpenPictureDialog1.Execute then
|
||||
@ -218,6 +225,7 @@ begin
|
||||
// icon
|
||||
IconLabel.Caption := dlgPOIcon;
|
||||
LoadIconButton.Caption := dlgPOLoadIcon;
|
||||
DefaultIconButton.Caption := dlgPODefaultIcon;
|
||||
SaveIconButton.Caption := dlgPOSaveIcon;
|
||||
ClearIconButton.Caption := dlgPOClearIcon;
|
||||
LoadIconButton.LoadGlyphFromStock(idButtonOpen);
|
||||
|
@ -2330,6 +2330,7 @@ resourcestring
|
||||
dlgPOExecutionLevel = 'Execution Level';
|
||||
dlgPOIcon = 'Icon:';
|
||||
dlgPOLoadIcon = '&Load Icon';
|
||||
dlgPODefaultIcon = 'Load &Default';
|
||||
dlgPOSaveIcon = '&Save Icon';
|
||||
dlgPOClearIcon = '&Clear Icon';
|
||||
dlgPOIconDesc = '(size: %d:%d, bpp: %d)';
|
||||
|
Loading…
Reference in New Issue
Block a user