Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
albireo77 committed Aug 14, 2021
1 parent f794ecc commit 76e1d4c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions Common/UserDataType.pas
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ constructor TUserDataType.Create(AParentForm: TDataTypesForm);
lblSize.ParentFont := false;
lblSize.Font.Style := [fsBold];
lblSize.Font.Color := clWindowText;
lblSize.SetBounds(176, 131, 0, 13);
lblSize.SetBounds(TInfra.Scaled(176), 131, 0, 13);
lblSize.Caption := i18Manager.GetString('lblSize');

lblType := TLabel.Create(Self);
lblType.Parent := Self;
lblType.ParentFont := false;
lblType.Font.Style := [fsBold];
lblType.Font.Color := clWindowText;
lblType.SetBounds(87, 131, 0, 13);
lblType.SetBounds(TInfra.Scaled(87), 131, 0, 13);
lblType.Caption := i18Manager.GetString('lblType');

sbxElements := TScrollBox.Create(Self);
Expand All @@ -125,7 +125,7 @@ constructor TUserDataType.Create(AParentForm: TDataTypesForm);
sbxElements.BorderStyle := bsNone;
sbxElements.Constraints.MaxHeight := AParentForm.Height - 233;
sbxElements.Constraints.MinWidth := 302;
sbxElements.SetBounds(0, 149, 308, 0);
sbxElements.SetBounds(0, 149, TInfra.Scaled(308), 0);
sbxElements.VertScrollBar.Tracking := true;
sbxElements.DoubleBuffered := true;
sbxElements.Anchors := [akTop, akBottom, akLeft, akRight];
Expand All @@ -137,28 +137,13 @@ constructor TUserDataType.Create(AParentForm: TDataTypesForm);
btnAddElement.Caption := i18Manager.GetString('btnAddField');
btnAddElement.ShowHint := true;
btnAddElement.DoubleBuffered := true;
btnAddElement.SetBounds(1, 102, 306, 25);
btnAddElement.SetBounds(1, 102, TInfra.Scaled(306), 25);
btnAddElement.OnClick := AddElement;

CreateLibControls(Self, edtName.Left+edtName.Width+7, 10);

chkAddPtrType := TCheckBox.Create(Self);
chkAddPtrType.Parent := Self;
chkAddPtrType.Caption := i18Manager.GetString('chkAddPtrType');
chkAddPtrType.ParentFont := false;
chkAddPtrType.Font.Style := [];
chkAddPtrType.Font.Color := clWindowText;
chkAddPtrType.SetBounds(180, 42, TInfra.GetAutoWidth(chkAddPtrType), 17);
chkAddPtrType.DoubleBuffered := true;
chkAddPtrType.Enabled := GInfra.CurrentLang.EnabledPointers;
chkAddPtrType.OnClick := OnClickCh;

CreateExtDeclareChBox(Self, 180, 60);
chkExternal.AllowGrayed := GInfra.CurrentLang.AllowTransExternDataType;

rgTypeBox := TRadioGroup.Create(Self);
rgTypeBox.Parent := Self;
rgTypeBox.SetBounds(1, 28, 173, 73);
rgTypeBox.ParentFont := false;
rgTypeBox.ParentBackground := false;
rgTypeBox.Font.Style := [];
Expand All @@ -180,6 +165,21 @@ constructor TUserDataType.Create(AParentForm: TDataTypesForm);
rgTypeBox.Items[Ord(dtRecord)] := GInfra.CurrentLang.RecordLabel;
rgTypeBox.ItemIndex := Ord(dtRecord);
rgTypeBox.OnClick := OnClickType;
rgTypeBox.SetBounds(1, 28, rgTypeBox.Buttons[Ord(dtEnum)].BoundsRect.Right-9, 73);

chkAddPtrType := TCheckBox.Create(Self);
chkAddPtrType.Parent := Self;
chkAddPtrType.Caption := i18Manager.GetString('chkAddPtrType');
chkAddPtrType.ParentFont := false;
chkAddPtrType.Font.Style := [];
chkAddPtrType.Font.Color := clWindowText;
chkAddPtrType.SetBounds(rgTypeBox.BoundsRect.Right+6, 42, TInfra.GetAutoWidth(chkAddPtrType), 17);
chkAddPtrType.DoubleBuffered := true;
chkAddPtrType.Enabled := GInfra.CurrentLang.EnabledPointers;
chkAddPtrType.OnClick := OnClickCh;

CreateExtDeclareChBox(Self, chkAddPtrType.Left, 60);
chkExternal.AllowGrayed := GInfra.CurrentLang.AllowTransExternDataType;

GProject.AddComponent(Self);
end;
Expand Down Expand Up @@ -305,18 +305,18 @@ constructor TField.Create(AParentTab: TUserDataType);
begin

inherited Create(AParentTab.sbxElements);

FElementTypeID := AParentTab.FElementTypeID;
Constraints.MaxWidth := AParentTab.sbxElements.Width - 6;
SetBounds(0, Parent.Height, Constraints.MaxWidth, TInfra.Scaled(22));
Align := alTop;

TInfra.PopulateDataTypeCombo(cbType, ParentTab.PageIndex);

btnRemove.SetBounds(239, 0, 52, 20);
btnRemove.SetBounds(TInfra.Scaled(237), 0, TInfra.GetAutoWidth(btnRemove)+14, TInfra.Scaled(20));

edtSize := TSizeEdit.Create(Self);
edtSize.SetBounds(176, 2, 54, 17);
edtSize.SetBounds(TInfra.Scaled(176), 2, 54, 17);
edtSize.BorderStyle := bsNone;
edtSize.OnChange := OnChangeSize;
end;
Expand Down

0 comments on commit 76e1d4c

Please sign in to comment.