Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
albireo77 committed Dec 24, 2024
1 parent 38ac9ee commit 42db88c
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 33 deletions.
18 changes: 12 additions & 6 deletions Common/DeclareList.pas
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ constructor TDeclareList.Create(AParent: TWinControl; ALeft, ATop, AWidth, ADisp

edtName := TEdit.Create(gbBox);
edtName.Parent := gbBox;
edtName.ParentCtl3D := False;
edtName.Ctl3D := False;
edtName.OnKeyDown := OnKeyDownCommon;

btnAdd := TButton.Create(Self);
Expand Down Expand Up @@ -303,7 +305,7 @@ constructor TConstDeclareList.Create(AParent: TWinControl; ALeft, ATop, AWidth,

inherited Create(AParent, ALeft, ATop, AWidth, ADispRowCount, AColCount);

edtName.SetBounds(lblName.Width+10, 17, gbBox.Width-lblName.Width-18, 21);
edtName.SetBounds(lblName.Width+10, 19, gbBox.Width-lblName.Width-18, 21);
edtName.Anchors := edtName.Anchors + [akRight];

lblValue := TLabel.Create(gbBox);
Expand All @@ -317,9 +319,11 @@ constructor TConstDeclareList.Create(AParent: TWinControl; ALeft, ATop, AWidth,

edtValue := TEdit.Create(gbBox);
edtValue.Parent := gbBox;
edtValue.SetBounds(lblValue.Width+10, 42, gbBox.Width-lblValue.Width-18, 21);
edtValue.SetBounds(lblValue.Width+10, 44, gbBox.Width-lblValue.Width-18, 21);
edtValue.Anchors := edtValue.Anchors + [akRight];
edtValue.ShowHint := True;
edtValue.ParentCtl3D := False;
edtValue.Ctl3D := False;
edtValue.Hint := trnsManager.GetString('DisableFieldValid');
edtValue.OnKeyDown := OnKeyDownCommon;

Expand All @@ -337,7 +341,7 @@ constructor TVarDeclareList.Create(AParent: TWinControl; ALeft, ATop, AWidth, AD

inherited Create(AParent, ALeft, ATop, AWidth, ADispRowCount, AColCount);

edtName.SetBounds(lblName.Width+10, 17, 100, 21);
edtName.SetBounds(lblName.Width+10, 19, 100, 21);

lblType := TLabel.Create(gbBox);
lblType.Parent := gbBox;
Expand All @@ -353,14 +357,14 @@ constructor TVarDeclareList.Create(AParent: TWinControl; ALeft, ATop, AWidth, AD

edtSize := TSizeEdit.Create(gbBox);
edtSize.Parent := gbBox;
edtSize.SetBounds(lblSize.BoundsRect.Right+5, 17, gbBox.Width - lblSize.BoundsRect.Right-13, 21);
edtSize.SetBounds(lblSize.BoundsRect.Right+5, 19, gbBox.Width - lblSize.BoundsRect.Right-13, 21);
edtSize.Anchors := edtSize.Anchors + [akRight];
edtSize.OnKeyDown := OnKeyDownCommon;

cbType := TComboBox.Create(gbBox);
cbType.Parent := gbBox;
cbType.Style := csDropDownList;
cbType.SetBounds(lblType.BoundsRect.Right + 5, 42, 0, 21);
cbType.SetBounds(lblType.BoundsRect.Right + 5, 44, 0, 21);
cbType.Constraints.MaxWidth := edtName.BoundsRect.Right - lblType.BoundsRect.Right - 5;
cbType.Constraints.MinWidth := cbType.Constraints.MaxWidth;
cbType.OnKeyDown := OnKeyDownCommon;
Expand All @@ -374,9 +378,11 @@ constructor TVarDeclareList.Create(AParent: TWinControl; ALeft, ATop, AWidth, AD

edtInit := TEdit.Create(gbBox);
edtInit.Parent := gbBox;
edtInit.SetBounds(lblInit.BoundsRect.Right+5, 42, gbBox.Width-lblInit.BoundsRect.Right-13, 21);
edtInit.SetBounds(lblInit.BoundsRect.Right+5, 44, gbBox.Width-lblInit.BoundsRect.Right-13, 21);
edtInit.Anchors := edtInit.Anchors + [akRight];
edtInit.ShowHint := True;
edtInit.ParentCtl3D := False;
edtInit.Ctl3D := False;
edtInit.Hint := trnsManager.GetString('DisableFieldValid');
edtInit.OnKeyDown := OnKeyDownCommon;

Expand Down
4 changes: 2 additions & 2 deletions Common/Element.pas
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ constructor TElement.Create(AParent: TScrollBox; const ATypeId: string);
edtName.Parent := Self;
edtName.SetBounds(3, 0, TInfra.Scaled(Self, 70), 21);
edtName.ParentFont := False;
edtName.Font.Style := [];
edtName.ParentCtl3D := False;
edtName.Ctl3D := True;
edtName.Font.Style := [];
edtName.Ctl3D := False;
edtName.ShowHint := True;
edtName.Hint := trnsManager.GetString('BadIdD');
edtName.Font.Color := NOK_COLOR;
Expand Down
2 changes: 2 additions & 0 deletions Common/SizeEdit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ constructor TSizeEdit.Create(AParent: TWinControl);
CharCase := ecUpperCase;
Hint := trnsManager.GetString('DisableFieldValid') + sLineBreak + ReplaceStr(trnsManager.GetString('edtSizeHint'), LB_PHOLDER2, sLineBreak);
ParentFont := False;
ParentCtl3D := False;
Ctl3D := False;
Font.Style := [];
Font.Color := BLACK_COLOR;
DoubleBuffered := True;
Expand Down
8 changes: 6 additions & 2 deletions Common/TabComponent.pas
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,14 @@ procedure TTabComponent.CreateNameControls(AParent: TWinControl; x, y: integer);

edtName := TEdit.Create(AParent);
edtName.Parent := AParent;
edtName.SetBounds(lblName.BoundsRect.Right+5, y-6, 104, 21);
edtName.SetBounds(lblName.BoundsRect.Right+5, y-5, 104, 21);
edtName.ParentFont := False;
edtName.ParentCtl3D := False;
edtName.Font.Style := [];
edtName.ShowHint := True;
edtName.Hint := trnsManager.GetString('BadIdD');
edtName.DoubleBuffered := True;
edtName.Ctl3D := False;
edtName.OnChange := OnChangeName;
end;

Expand All @@ -261,12 +263,14 @@ procedure TTabComponent.CreateLibControls(AParent: TWinControl; x, y: integer);

edtLibrary := TEdit.Create(AParent);
edtLibrary.Parent := AParent;
edtLibrary.SetBounds(lblLibrary.BoundsRect.Right+5, y-6, 135-lblLibrary.Width, 21);
edtLibrary.SetBounds(lblLibrary.BoundsRect.Right+5, y-5, 135-lblLibrary.Width, 21);
edtLibrary.ParentFont := False;
edtLibrary.ParentCtl3D := False;
edtLibrary.Font.Style := [];
edtLibrary.Font.Color := clGreen;
edtLibrary.ShowHint := True;
edtLibrary.DoubleBuffered := True;
edtLibrary.Ctl3D := False;
edtLibrary.OnChange := OnChangeLib;
edtLibrary.Hint := trnsManager.GetFormattedString('edtLibraryHint', [GInfra.CurrentLang.LibraryExt]);
end;
Expand Down
6 changes: 4 additions & 2 deletions Common/UserFunction.pas
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ constructor TUserFunctionHeader.Create(AParentForm: TFunctionsForm);
memDesc.Parent := gbDesc;
memDesc.SetBounds(5, 17, gbDesc.Width-12, chkInclDescCode.Top-22);
memDesc.ParentFont := False;
memDesc.ParentCtl3D := False;
memDesc.Ctl3D := False;
memDesc.Font.Style := [];
memDesc.Font.Color := clGreen;
memDesc.WordWrap := False;
Expand Down Expand Up @@ -629,10 +631,10 @@ constructor TParameter.Create(AParentTab: TUserFunctionHeader);
edtDefault.Parent := Self;
edtDefault.SetBounds(TInfra.Scaled(Self, 174), 0, TInfra.Scaled(Self, 50), 21);
edtDefault.ParentFont := False;
edtDefault.ParentCtl3D := False;
edtDefault.Font.Style := [];
edtDefault.Font.Color := clGreen;
edtDefault.ParentCtl3D := False;
edtDefault.Ctl3D := True;
edtDefault.Ctl3D := False;
edtDefault.OnChange := OnChangeType;

chkTable := TCheckBox.Create(Self);
Expand Down
2 changes: 2 additions & 0 deletions Forms/EditMemo_Form.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ object MemoEditorForm: TMemoEditorForm
Width = 264
Height = 143
Align = alClient
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clNavy
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentCtl3D = False
ParentFont = False
TabOrder = 0
end
Expand Down
4 changes: 3 additions & 1 deletion Forms/Goto_Form.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ object GotoForm: TGotoForm
object edtNumber: TEdit
Tag = 5
Left = 72
Top = 5
Top = 7
Width = 41
Height = 21
Ctl3D = False
NumbersOnly = True
ParentCtl3D = False
TabOrder = 1
Text = '0'
end
Expand Down
52 changes: 35 additions & 17 deletions Forms/Settings_Form.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,16 @@ object SettingsForm: TSettingsForm
object edtCompiler: TEdit
Tag = 5
Left = 104
Top = 46
Top = 48
Width = 345
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentCtl3D = False
ParentFont = False
ParentShowHint = False
ShowHint = True
Expand Down Expand Up @@ -181,14 +183,16 @@ object SettingsForm: TSettingsForm
object edtCompilerNoMain: TEdit
Tag = 5
Left = 200
Top = 70
Top = 72
Width = 249
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentCtl3D = False
ParentFont = False
ParentShowHint = False
ShowHint = True
Expand Down Expand Up @@ -779,15 +783,17 @@ object SettingsForm: TSettingsForm
object edtEditorIndent: TEdit
Tag = 5
Left = 503
Top = 13
Top = 14
Width = 38
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
NumbersOnly = True
ParentCtl3D = False
ParentFont = False
TabOrder = 0
end
Expand Down Expand Up @@ -909,14 +915,16 @@ object SettingsForm: TSettingsForm
object edtTranslationFile: TEdit
Tag = 5
Left = 88
Top = 24
Top = 26
Width = 361
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentCtl3D = False
ParentFont = False
ParentShowHint = False
ShowHint = True
Expand Down Expand Up @@ -1074,13 +1082,15 @@ object SettingsForm: TSettingsForm
Left = 104
Top = 21
Width = 145
Height = 21
Height = 19
TabStop = False
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentCtl3D = False
ParentFont = False
ParentShowHint = False
ReadOnly = True
Expand Down Expand Up @@ -1271,60 +1281,68 @@ object SettingsForm: TSettingsForm
object edtMarginLeft: TEdit
Tag = 5
Left = 56
Top = 24
Top = 28
Width = 25
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
NumbersOnly = True
ParentCtl3D = False
ParentFont = False
TabOrder = 0
end
object edtMarginRight: TEdit
Tag = 5
Left = 56
Top = 48
Top = 52
Width = 25
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
NumbersOnly = True
ParentCtl3D = False
ParentFont = False
TabOrder = 1
end
object edtMarginTop: TEdit
Tag = 5
Left = 144
Top = 24
Top = 28
Width = 25
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
NumbersOnly = True
ParentCtl3D = False
ParentFont = False
TabOrder = 2
end
object edtMarginBottom: TEdit
Tag = 5
Left = 144
Top = 48
Top = 52
Width = 25
Height = 21
Height = 19
Ctl3D = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
NumbersOnly = True
ParentCtl3D = False
ParentFont = False
TabOrder = 3
end
Expand Down
6 changes: 3 additions & 3 deletions Forms/Settings_Form.pas
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ procedure TSettingsForm.AfterTranslation(AList: TStringList);
var w := TInfra.Scaled(Self, 449);
lblFileEncoding.Left := cbFileEncoding.Left - lblFileEncoding.Width - 5;
lblCompiler.Left := 7;
edtCompiler.Left := lblCompiler.Width + lblCompiler.Left + 5;
edtCompiler.Left := lblCompiler.Width + lblCompiler.Left + 6;
edtCompiler.Width := w - edtCompiler.Left;
lblCompilerNoMain.Left := 7;
edtCompilerNoMain.Left := lblCompilerNoMain.Width + lblCompilerNoMain.Left + 5;
edtCompilerNoMain.Left := lblCompilerNoMain.Width + lblCompilerNoMain.Left + 6;
edtCompilerNoMain.Width := w - edtCompilerNoMain.Left;
edtTranslationFile.Left := lblFile.Width + lblFile.Left + 5;;
edtTranslationFile.Left := lblFile.Width + lblFile.Left + 6;
edtTranslationFile.Width := w - edtTranslationFile.Left;
var val := lblDesktop.Width;
if val < lblSelectColor.Width then
Expand Down

0 comments on commit 42db88c

Please sign in to comment.