mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 06:38:11 +01:00
IDE: add a link for Widgetset settings also to Config and Target page. Fix comp. names.
git-svn-id: trunk@45061 -
This commit is contained in:
parent
a94d290c94
commit
2026bcfa22
@ -8,20 +8,20 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
TabOrder = 0
|
||||
DesignLeft = 338
|
||||
DesignTop = 284
|
||||
object grpConfigFile: TGroupBox
|
||||
object grbConfigFile: TGroupBox
|
||||
Left = 0
|
||||
Height = 106
|
||||
Height = 102
|
||||
Top = 0
|
||||
Width = 594
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
Caption = 'grpConfigFile'
|
||||
ClientHeight = 86
|
||||
Caption = 'grbConfigFile'
|
||||
ClientHeight = 83
|
||||
ClientWidth = 590
|
||||
TabOrder = 0
|
||||
object chkConfigFile: TCheckBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Height = 21
|
||||
Top = 6
|
||||
Width = 578
|
||||
Align = alTop
|
||||
@ -33,8 +33,8 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
end
|
||||
object chkCustomConfigFile: TCheckBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 31
|
||||
Height = 21
|
||||
Top = 30
|
||||
Width = 578
|
||||
Align = alTop
|
||||
BorderSpacing.Left = 6
|
||||
@ -51,8 +51,8 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
AnchorSideRight.Control = chkCustomConfigFile
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 25
|
||||
Height = 26
|
||||
Top = 54
|
||||
Height = 25
|
||||
Top = 52
|
||||
Width = 559
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 19
|
||||
@ -62,27 +62,27 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
Text = 'edtConfigPath'
|
||||
end
|
||||
end
|
||||
object grpTargetPlatform: TGroupBox
|
||||
object grbTargetPlatform: TGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 125
|
||||
Top = 114
|
||||
Height = 109
|
||||
Top = 110
|
||||
Width = 594
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Target Platform'
|
||||
ClientHeight = 105
|
||||
ClientHeight = 90
|
||||
ClientWidth = 590
|
||||
TabOrder = 1
|
||||
object lblTargetOS: TLabel
|
||||
AnchorSideLeft.Control = grpTargetPlatform
|
||||
AnchorSideLeft.Control = grbTargetPlatform
|
||||
AnchorSideTop.Control = TargetOSComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 9
|
||||
Width = 83
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 70
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'lblTargetOS'
|
||||
ParentColor = False
|
||||
@ -92,9 +92,9 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
AnchorSideTop.Control = TargetCPUComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 42
|
||||
Width = 91
|
||||
Height = 15
|
||||
Top = 36
|
||||
Width = 78
|
||||
Caption = 'lblTargetCPU'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -103,22 +103,22 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
AnchorSideTop.Control = TargetProcComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 75
|
||||
Width = 93
|
||||
Height = 15
|
||||
Top = 64
|
||||
Width = 81
|
||||
Caption = 'lblTargetProc'
|
||||
ParentColor = False
|
||||
end
|
||||
object TargetOSComboBox: TComboBox
|
||||
AnchorSideLeft.Control = lblTargetOS
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = grpTargetPlatform
|
||||
AnchorSideRight.Control = grpTargetPlatform
|
||||
AnchorSideTop.Control = grbTargetPlatform
|
||||
AnchorSideRight.Control = grbTargetPlatform
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 95
|
||||
Height = 30
|
||||
Left = 82
|
||||
Height = 25
|
||||
Top = 3
|
||||
Width = 489
|
||||
Width = 502
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
@ -133,12 +133,12 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TargetOSComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = grpTargetPlatform
|
||||
AnchorSideRight.Control = grbTargetPlatform
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 103
|
||||
Height = 30
|
||||
Top = 36
|
||||
Width = 481
|
||||
Left = 90
|
||||
Height = 25
|
||||
Top = 31
|
||||
Width = 494
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
@ -153,12 +153,12 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TargetCPUComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = grpTargetPlatform
|
||||
AnchorSideRight.Control = grbTargetPlatform
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 105
|
||||
Height = 30
|
||||
Top = 69
|
||||
Width = 479
|
||||
Left = 93
|
||||
Height = 25
|
||||
Top = 59
|
||||
Width = 491
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
@ -171,19 +171,19 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
end
|
||||
object grbTargetOptions: TGroupBox
|
||||
Left = 0
|
||||
Height = 54
|
||||
Top = 247
|
||||
Height = 57
|
||||
Top = 227
|
||||
Width = 594
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Target-specific options'
|
||||
ClientHeight = 34
|
||||
ClientHeight = 38
|
||||
ClientWidth = 590
|
||||
TabOrder = 2
|
||||
object chkWin32GraphicApp: TCheckBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Height = 21
|
||||
Top = 6
|
||||
Width = 578
|
||||
Align = alTop
|
||||
@ -192,4 +192,20 @@ object CompilerConfigTargetFrame: TCompilerConfigTargetFrame
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object LCLWidgetTypeLabel: TLabel
|
||||
AnchorSideTop.Control = grbTargetOptions
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 3
|
||||
Height = 15
|
||||
Top = 292
|
||||
Width = 122
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'LCLWidgetTypeLabel'
|
||||
Font.Color = clBlue
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnClick = LCLWidgetTypeLabelClick
|
||||
OnMouseEnter = LCLWidgetTypeLabelMouseEnter
|
||||
OnMouseLeave = LCLWidgetTypeLabelMouseLeave
|
||||
end
|
||||
end
|
||||
|
||||
@ -28,8 +28,8 @@ unit compiler_config_target;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, strutils, FileUtil, Controls, Dialogs, StdCtrls, LCLProc,
|
||||
IDEOptionsIntf, IDEDialogs, CompilerOptions, LazarusIDEStrConsts,
|
||||
Classes, SysUtils, strutils, FileUtil, Controls, Dialogs, Graphics, StdCtrls,
|
||||
LCLProc, IDEOptionsIntf, IDEDialogs, CompilerOptions, LazarusIDEStrConsts,
|
||||
TransferMacros, PackageDefs, compiler_parsing_options;
|
||||
|
||||
type
|
||||
@ -42,17 +42,21 @@ type
|
||||
chkWin32GraphicApp: TCheckBox;
|
||||
edtConfigPath: TEdit;
|
||||
grbTargetOptions: TGroupBox;
|
||||
grpConfigFile: TGroupBox;
|
||||
grpTargetPlatform: TGroupBox;
|
||||
grbConfigFile: TGroupBox;
|
||||
grbTargetPlatform: TGroupBox;
|
||||
lblTargetCPU: TLabel;
|
||||
lblTargetOS: TLabel;
|
||||
lblTargetProc: TLabel;
|
||||
LCLWidgetTypeLabel: TLabel;
|
||||
TargetCPUComboBox: TComboBox;
|
||||
TargetOSComboBox: TComboBox;
|
||||
TargetProcComboBox: TComboBox;
|
||||
procedure chkCustomConfigFileClick(Sender: TObject);
|
||||
procedure TargetOSComboBoxSelect(Sender: TObject);
|
||||
procedure TargetCPUComboBoxSelect(Sender: TObject);
|
||||
procedure LCLWidgetTypeLabelClick(Sender: TObject);
|
||||
procedure LCLWidgetTypeLabelMouseEnter(Sender: TObject);
|
||||
procedure LCLWidgetTypeLabelMouseLeave(Sender: TObject);
|
||||
private
|
||||
FDialog: TAbstractOptionsEditorDialog;
|
||||
FCompOptions: TBaseCompilerOptions;
|
||||
@ -197,6 +201,10 @@ begin
|
||||
DebugLn(['TCompilerConfigTargetFrame.UpdateTargetSpecific: TargetOS=',aTargetOS,DbgMsg]);
|
||||
// Now hide/show the whole GroupBox because there is only one setting.
|
||||
grbTargetOptions.Visible := AnsiStartsText('Win', aTargetOS);
|
||||
if grbTargetOptions.Visible then
|
||||
LCLWidgetTypeLabel.AnchorSideTop.Control := grbTargetOptions
|
||||
else
|
||||
LCLWidgetTypeLabel.AnchorSideTop.Control := grbTargetPlatform;
|
||||
end;
|
||||
|
||||
procedure TCompilerConfigTargetFrame.UpdateByTargetCPU(aTargetCPU: string);
|
||||
@ -299,13 +307,13 @@ begin
|
||||
FDialog := ADialog;
|
||||
|
||||
// Config
|
||||
grpConfigFile.Caption := dlgConfigFiles;
|
||||
grbConfigFile.Caption := dlgConfigFiles;
|
||||
chkConfigFile.Caption := dlgUseFpcCfg + ' (If not checked: -n)';
|
||||
chkCustomConfigFile.Caption := dlgUseCustomConfig + ' (@)';
|
||||
edtConfigPath.Text := '';
|
||||
|
||||
// Target platform
|
||||
grpTargetPlatform.Caption := dlgTargetPlatform;
|
||||
grbTargetPlatform.Caption := dlgTargetPlatform;
|
||||
lblTargetOS.Caption := dlgTargetOS + ' (-T)';
|
||||
with TargetOSComboBox do
|
||||
begin
|
||||
@ -364,6 +372,7 @@ begin
|
||||
end;
|
||||
|
||||
lblTargetProc.Caption := dlgTargetProc;
|
||||
LCLWidgetTypeLabel.Caption := lisSelectAnotherLCLWidgetSetMacroLCLWidgetType;
|
||||
|
||||
// Target options
|
||||
grbTargetOptions.Caption := dlgTargetSpecificOptions;
|
||||
@ -385,14 +394,15 @@ begin
|
||||
edtConfigPath.Enabled := chkCustomConfigFile.Checked;
|
||||
edtConfigPath.Text := ConfigFilePath;
|
||||
if fIsPackage then begin
|
||||
grpTargetPlatform.Visible:=false;
|
||||
grbTargetPlatform.Visible:=false;
|
||||
TargetOSComboBox.ItemIndex := 0;
|
||||
TargetOSComboBox.Text := 'default';
|
||||
TargetCPUComboBox.ItemIndex := 0;
|
||||
TargetCPUComboBox.Text := 'default';
|
||||
TargetProcComboBox.Text := 'default';
|
||||
LCLWidgetTypeLabel.Visible:=false;
|
||||
end else begin
|
||||
grpTargetPlatform.Visible:=true;
|
||||
grbTargetPlatform.Visible:=true;
|
||||
// Target OS
|
||||
i := TargetOSComboBox.Items.IndexOf(TargetOS);
|
||||
if i < 0 then
|
||||
@ -407,6 +417,7 @@ begin
|
||||
UpdateByTargetCPU(TargetCPU);
|
||||
UpdateByTargetOS(TargetOS);
|
||||
TargetProcComboBox.Text := ProcessorToCaption(TargetProcessor);
|
||||
LCLWidgetTypeLabel.Visible:=true;
|
||||
end;
|
||||
chkWin32GraphicApp.Checked := Win32GraphicApp;
|
||||
chkWin32GraphicApp.Enabled := NeedsLinkerOpts;
|
||||
@ -473,6 +484,23 @@ begin
|
||||
UpdateByTargetCPU(s);
|
||||
end;
|
||||
|
||||
procedure TCompilerConfigTargetFrame.LCLWidgetTypeLabelClick(Sender: TObject);
|
||||
begin
|
||||
FDialog.OpenEditor(GroupCompiler,CompilerOptionsAdditionsAndOverrides);
|
||||
end;
|
||||
|
||||
procedure TCompilerConfigTargetFrame.LCLWidgetTypeLabelMouseEnter(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := True;
|
||||
(Sender as TLabel).Font.Color := clRed;
|
||||
end;
|
||||
|
||||
procedure TCompilerConfigTargetFrame.LCLWidgetTypeLabelMouseLeave(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := False;
|
||||
(Sender as TLabel).Font.Color := clBlue;
|
||||
end;
|
||||
|
||||
class function TCompilerConfigTargetFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TBaseCompilerOptions;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user