ide: add a button to restore default project icon

git-svn-id: trunk@43010 -
This commit is contained in:
paul 2013-09-28 14:35:59 +00:00
parent 5da511836b
commit 8a831f63e9
3 changed files with 77 additions and 54 deletions

View File

@ -6,27 +6,27 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
ClientHeight = 425 ClientHeight = 425
ClientWidth = 522 ClientWidth = 522
TabOrder = 0 TabOrder = 0
DesignLeft = 411 DesignLeft = 1197
DesignTop = 290 DesignTop = 317
object AppSettingsGroupBox: TGroupBox object AppSettingsGroupBox: TGroupBox
Left = 0 Left = 0
Height = 352 Height = 356
Top = 0 Top = 0
Width = 522 Width = 522
Align = alTop Align = alTop
AutoSize = True AutoSize = True
Caption = 'AppSettingsGroupBox' Caption = 'AppSettingsGroupBox'
ClientHeight = 330 ClientHeight = 338
ClientWidth = 514 ClientWidth = 518
TabOrder = 0 TabOrder = 0
object TitleLabel: TLabel object TitleLabel: TLabel
AnchorSideLeft.Control = AppSettingsGroupBox AnchorSideLeft.Control = AppSettingsGroupBox
AnchorSideTop.Control = TitleEdit AnchorSideTop.Control = TitleEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 16 Height = 15
Top = 9 Top = 10
Width = 61 Width = 51
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'TitleLabel' Caption = 'TitleLabel'
ParentColor = False ParentColor = False
@ -35,9 +35,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideLeft.Control = AppSettingsGroupBox AnchorSideLeft.Control = AppSettingsGroupBox
AnchorSideTop.Control = IconPanel AnchorSideTop.Control = IconPanel
Left = 6 Left = 6
Height = 16 Height = 15
Top = 34 Top = 35
Width = 60 Width = 51
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'IconLabel' Caption = 'IconLabel'
ParentColor = False ParentColor = False
@ -49,9 +49,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = IconTrack AnchorSideRight.Control = IconTrack
Left = 240 Left = 240
Height = 16 Height = 15
Top = 174 Top = 176
Width = 95 Width = 80
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
Caption = 'IconTrackLabel' Caption = 'IconTrackLabel'
@ -59,9 +59,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
end end
object TitleEdit: TEdit object TitleEdit: TEdit
Left = 106 Left = 106
Height = 22 Height = 23
Top = 6 Top = 6
Width = 402 Width = 406
Align = alTop Align = alTop
BorderSpacing.Left = 100 BorderSpacing.Left = 100
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -73,9 +73,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Control = IconTrack AnchorSideTop.Control = IconTrack
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 18 Height = 19
Top = 208 Top = 209
Width = 174 Width = 150
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'UseAppBundleCheckBox' Caption = 'UseAppBundleCheckBox'
TabOrder = 6 TabOrder = 6
@ -85,9 +85,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Control = UseAppBundleCheckBox AnchorSideTop.Control = UseAppBundleCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 18 Height = 19
Top = 232 Top = 234
Width = 174 Width = 151
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'UseXPManifestCheckBox' Caption = 'UseXPManifestCheckBox'
OnChange = UseXPManifestCheckBoxChange OnChange = UseXPManifestCheckBoxChange
@ -99,7 +99,7 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 106 Left = 106
Height = 128 Height = 128
Top = 34 Top = 35
Width = 128 Width = 128
BorderSpacing.Left = 106 BorderSpacing.Left = 106
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -107,14 +107,14 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
BevelOuter = bvNone BevelOuter = bvNone
BorderWidth = 1 BorderWidth = 1
BorderStyle = bsSingle BorderStyle = bsSingle
ClientHeight = 128 ClientHeight = 124
ClientWidth = 128 ClientWidth = 124
TabOrder = 1 TabOrder = 1
object IconImage: TImage object IconImage: TImage
Left = 1 Left = 1
Height = 126 Height = 122
Top = 1 Top = 1
Width = 126 Width = 122
Align = alClient Align = alClient
Center = True Center = True
OnPictureChanged = IconImagePictureChanged OnPictureChanged = IconImagePictureChanged
@ -127,9 +127,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideBottom.Control = IconPanel AnchorSideBottom.Control = IconPanel
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 240 Left = 240
Height = 22 Height = 25
Top = 34 Top = 35
Width = 123 Width = 111
AutoSize = True AutoSize = True
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'LoadIconButton' Caption = 'LoadIconButton'
@ -138,12 +138,12 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
end end
object SaveIconButton: TBitBtn object SaveIconButton: TBitBtn
AnchorSideLeft.Control = LoadIconButton AnchorSideLeft.Control = LoadIconButton
AnchorSideTop.Control = LoadIconButton AnchorSideTop.Control = DefaultIconButton
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 240 Left = 240
Height = 22 Height = 25
Top = 62 Top = 97
Width = 120 Width = 109
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'SaveIconButton' Caption = 'SaveIconButton'
@ -155,9 +155,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Control = SaveIconButton AnchorSideTop.Control = SaveIconButton
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 240 Left = 240
Height = 22 Height = 25
Top = 90 Top = 128
Width = 125 Width = 112
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'ClearIconButton' Caption = 'ClearIconButton'
@ -172,7 +172,7 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 106 Left = 106
Height = 40 Height = 40
Top = 162 Top = 163
Width = 128 Width = 128
Max = 0 Max = 0
OnChange = IconTrackChange OnChange = IconTrackChange
@ -186,9 +186,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Control = UseXPManifestCheckBox AnchorSideTop.Control = UseXPManifestCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 27 Left = 27
Height = 18 Height = 19
Top = 256 Top = 259
Width = 143 Width = 123
BorderSpacing.Left = 15 BorderSpacing.Left = 15
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'DpiAwareCheckBox' Caption = 'DpiAwareCheckBox'
@ -199,9 +199,9 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Control = ExecutionLevelComboBox AnchorSideTop.Control = ExecutionLevelComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 27 Left = 27
Height = 18 Height = 19
Top = 306 Top = 313
Width = 138 Width = 119
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
Caption = 'UIAccessCheckBox' Caption = 'UIAccessCheckBox'
@ -212,12 +212,12 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = DpiAwareCheckBox AnchorSideTop.Control = DpiAwareCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 160 Left = 139
Height = 20 Height = 23
Top = 280 Top = 284
Width = 223 Width = 223
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 0 ItemHeight = 15
Style = csDropDownList Style = csDropDownList
TabOrder = 9 TabOrder = 9
end end
@ -226,23 +226,37 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Control = ExecutionLevelComboBox AnchorSideTop.Control = ExecutionLevelComboBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 27 Left = 27
Height = 16 Height = 15
Top = 282 Top = 288
Width = 127 Width = 106
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
Caption = 'ExecutionLevelLabel' Caption = 'ExecutionLevelLabel'
ParentColor = False ParentColor = False
end 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 end
object CreateAppBundleButton: TBitBtn object CreateAppBundleButton: TBitBtn
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = AppSettingsGroupBox AnchorSideTop.Control = AppSettingsGroupBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 0 Left = 0
Height = 22 Height = 25
Top = 358 Top = 362
Width = 175 Width = 155
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'CreateAppBundleButton' Caption = 'CreateAppBundleButton'

View File

@ -16,6 +16,7 @@ type
TProjectApplicationOptionsFrame = class(TAbstractIDEOptionsEditor) TProjectApplicationOptionsFrame = class(TAbstractIDEOptionsEditor)
AppSettingsGroupBox: TGroupBox; AppSettingsGroupBox: TGroupBox;
DefaultIconButton: TButton;
UIAccessCheckBox: TCheckBox; UIAccessCheckBox: TCheckBox;
ExecutionLevelComboBox: TComboBox; ExecutionLevelComboBox: TComboBox;
DpiAwareCheckBox: TCheckBox; DpiAwareCheckBox: TCheckBox;
@ -37,6 +38,7 @@ type
UseXPManifestCheckBox: TCheckBox; UseXPManifestCheckBox: TCheckBox;
procedure ClearIconButtonClick(Sender: TObject); procedure ClearIconButtonClick(Sender: TObject);
procedure CreateAppBundleButtonClick(Sender: TObject); procedure CreateAppBundleButtonClick(Sender: TObject);
procedure DefaultIconButtonClick(Sender: TObject);
procedure IconImagePictureChanged(Sender: TObject); procedure IconImagePictureChanged(Sender: TObject);
procedure IconTrackChange(Sender: TObject); procedure IconTrackChange(Sender: TObject);
procedure LoadIconButtonClick(Sender: TObject); procedure LoadIconButtonClick(Sender: TObject);
@ -141,6 +143,11 @@ begin
CreateProjectApplicationBundle(FProject); CreateProjectApplicationBundle(FProject);
end; end;
procedure TProjectApplicationOptionsFrame.DefaultIconButtonClick(Sender: TObject);
begin
IconImage.Picture.Icon.LoadFromResourceName(HInstance, 'MAINICONPROJECT');
end;
procedure TProjectApplicationOptionsFrame.LoadIconButtonClick(Sender: TObject); procedure TProjectApplicationOptionsFrame.LoadIconButtonClick(Sender: TObject);
begin begin
if OpenPictureDialog1.Execute then if OpenPictureDialog1.Execute then
@ -218,6 +225,7 @@ begin
// icon // icon
IconLabel.Caption := dlgPOIcon; IconLabel.Caption := dlgPOIcon;
LoadIconButton.Caption := dlgPOLoadIcon; LoadIconButton.Caption := dlgPOLoadIcon;
DefaultIconButton.Caption := dlgPODefaultIcon;
SaveIconButton.Caption := dlgPOSaveIcon; SaveIconButton.Caption := dlgPOSaveIcon;
ClearIconButton.Caption := dlgPOClearIcon; ClearIconButton.Caption := dlgPOClearIcon;
LoadIconButton.LoadGlyphFromStock(idButtonOpen); LoadIconButton.LoadGlyphFromStock(idButtonOpen);

View File

@ -2330,6 +2330,7 @@ resourcestring
dlgPOExecutionLevel = 'Execution Level'; dlgPOExecutionLevel = 'Execution Level';
dlgPOIcon = 'Icon:'; dlgPOIcon = 'Icon:';
dlgPOLoadIcon = '&Load Icon'; dlgPOLoadIcon = '&Load Icon';
dlgPODefaultIcon = 'Load &Default';
dlgPOSaveIcon = '&Save Icon'; dlgPOSaveIcon = '&Save Icon';
dlgPOClearIcon = '&Clear Icon'; dlgPOClearIcon = '&Clear Icon';
dlgPOIconDesc = '(size: %d:%d, bpp: %d)'; dlgPOIconDesc = '(size: %d:%d, bpp: %d)';