mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
converted ScaleCompsDlg to lfm from Darius
git-svn-id: trunk@8485 -
This commit is contained in:
parent
25a6add0d6
commit
fd511efafd
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -520,6 +520,8 @@ designer/menueditorform.pas svneol=native#text/pascal
|
||||
designer/menupropedit.pp svneol=native#text/pascal
|
||||
designer/noncontroldesigner.pas svneol=native#text/pascal
|
||||
designer/objinspext.pas svneol=native#text/pascal
|
||||
designer/scalecompsdlg.lfm svneol=native#text/plain
|
||||
designer/scalecompsdlg.lrs svneol=native#text/plain
|
||||
designer/scalecompsdlg.pp svneol=native#text/pascal
|
||||
designer/sizecompsdlg.pp svneol=native#text/pascal
|
||||
designer/taborderdlg.lfm svneol=native#text/plain
|
||||
|
85
designer/scalecompsdlg.lfm
Normal file
85
designer/scalecompsdlg.lfm
Normal file
@ -0,0 +1,85 @@
|
||||
object ScaleComponentsDialog: TScaleComponentsDialog
|
||||
ActiveControl = OKButton
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'ScaleComponentsDialog'
|
||||
ClientHeight = 82
|
||||
ClientWidth = 258
|
||||
PixelsPerInch = 96
|
||||
Position = poScreenCenter
|
||||
HorzScrollBar.Page = 257
|
||||
VertScrollBar.Page = 81
|
||||
Left = 319
|
||||
Height = 82
|
||||
Top = 881
|
||||
Width = 258
|
||||
object PercentLabel: TLabel
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'PercentLabel'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 189
|
||||
Height = 14
|
||||
Top = 8
|
||||
Width = 63
|
||||
end
|
||||
object ScaleLabel: TLabel
|
||||
Caption = 'ScaleLabel'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
Left = 8
|
||||
Height = 14
|
||||
Top = 8
|
||||
Width = 51
|
||||
end
|
||||
object OKButton: TBitBtn
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.InnerBorder = 2
|
||||
Caption = '&OK'
|
||||
Default = True
|
||||
Kind = bkOK
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
TabOrder = 0
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 184
|
||||
Height = 34
|
||||
Top = 40
|
||||
Width = 68
|
||||
end
|
||||
object CancelButton: TBitBtn
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.InnerBorder = 2
|
||||
Caption = 'Cancel'
|
||||
Kind = bkCancel
|
||||
ModalResult = 2
|
||||
NumGlyphs = 0
|
||||
TabOrder = 1
|
||||
AnchorSideRight.Control = OKButton
|
||||
Left = 98
|
||||
Height = 34
|
||||
Top = 40
|
||||
Width = 80
|
||||
end
|
||||
object PercentEdit: TEdit
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
TabOrder = 2
|
||||
Text = 'PercentEdit'
|
||||
AnchorSideLeft.Control = ScaleLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = PercentLabel
|
||||
Left = 65
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 118
|
||||
end
|
||||
end
|
28
designer/scalecompsdlg.lrs
Normal file
28
designer/scalecompsdlg.lrs
Normal file
@ -0,0 +1,28 @@
|
||||
LazarusResources.Add('TScaleComponentsDialog','FORMDATA',[
|
||||
'TPF0'#22'TScaleComponentsDialog'#21'ScaleComponentsDialog'#13'ActiveControl'
|
||||
+#7#8'OKButton'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#21'ScaleComp'
|
||||
+'onentsDialog'#12'ClientHeight'#2'R'#11'ClientWidth'#3#2#1#13'PixelsPerInch'
|
||||
+#2'`'#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#1#1#18'VertS'
|
||||
+'crollBar.Page'#2'Q'#4'Left'#3'?'#1#6'Height'#2'R'#3'Top'#3'q'#3#5'Width'#3#2
|
||||
+#1#0#6'TLabel'#12'PercentLabel'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'Borde'
|
||||
+'rSpacing.Right'#2#6#7'Caption'#6#12'PercentLabel'#5'Color'#7#6'clNone'#11'P'
|
||||
+'arentColor'#8#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Sid'
|
||||
+'e'#7#9'asrBottom'#4'Left'#3#189#0#6'Height'#2#14#3'Top'#2#8#5'Width'#2'?'#0
|
||||
+#0#6'TLabel'#10'ScaleLabel'#7'Caption'#6#10'ScaleLabel'#5'Color'#7#6'clNone'
|
||||
+#11'ParentColor'#8#4'Left'#2#8#6'Height'#2#14#3'Top'#2#8#5'Width'#2'3'#0#0#7
|
||||
+'TBitBtn'#8'OKButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#19
|
||||
+'BorderSpacing.Right'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&'
|
||||
+'OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'T'
|
||||
+'abOrder'#2#0#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'
|
||||
+#7#9'asrBottom'#4'Left'#3#184#0#6'Height'#2'"'#3'Top'#2'('#5'Width'#2'D'#0#0
|
||||
+#7'TBitBtn'#12'CancelButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSi'
|
||||
+'ze'#9#19'BorderSpacing.Right'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Capti'
|
||||
+'on'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#8
|
||||
+'TabOrder'#2#1#23'AnchorSideRight.Control'#7#8'OKButton'#4'Left'#2'b'#6'Heig'
|
||||
+'ht'#2'"'#3'Top'#2'('#5'Width'#2'P'#0#0#5'TEdit'#11'PercentEdit'#7'Anchors'
|
||||
+#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#19'BorderSpac'
|
||||
+'ing.Right'#2#6#8'TabOrder'#2#2#4'Text'#6#11'PercentEdit'#22'AnchorSideLeft.'
|
||||
+'Control'#7#10'ScaleLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorS'
|
||||
+'ideRight.Control'#7#12'PercentLabel'#4'Left'#2'A'#6'Height'#2#23#3'Top'#2#8
|
||||
+#5'Width'#2'v'#0#0#0
|
||||
]);
|
@ -35,19 +35,15 @@ uses
|
||||
|
||||
type
|
||||
TScaleComponentsDialog = class(TForm)
|
||||
Bevel: TBevel;
|
||||
ScaleLabel: TLabel;
|
||||
PercentEdit: TEdit;
|
||||
PercentLabel: TLabel;
|
||||
OkButton: TButton;
|
||||
CancelButton: TButton;
|
||||
procedure OkButtonClick(Sender: TObject);
|
||||
procedure CancelButtonClick(Sender: TObject);
|
||||
OkButton: TBitBtn;
|
||||
CancelButton: TBitBtn;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
end;
|
||||
|
||||
|
||||
function ShowScaleComponentsDialog(var ScaleInPercent: integer): TModalResult;
|
||||
|
||||
implementation
|
||||
@ -69,92 +65,17 @@ end;
|
||||
constructor TScaleComponentsDialog.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
if LazarusResources.Find(Classname)=nil then begin
|
||||
SetBounds((Screen.Width-270) div 2,(Screen.Height-110) div 2,260,100);
|
||||
Caption:='Scale';
|
||||
|
||||
Bevel:=TBevel.Create(Self);
|
||||
with Bevel do begin
|
||||
Name:='Bevel';
|
||||
Parent:=Self;
|
||||
Left:=5;
|
||||
Top:=5;
|
||||
Width:=250;
|
||||
Height:=50;
|
||||
Visible:=true;
|
||||
end;
|
||||
Caption:='Scale';
|
||||
|
||||
ScaleLabel:=TLabel.Create(Self);
|
||||
with ScaleLabel do begin
|
||||
Name:='ScaleLabel';
|
||||
Parent:=Self;
|
||||
Left:=12;
|
||||
Top:=15;
|
||||
Width:=90;
|
||||
Height:=25;
|
||||
Caption:=lisScalingFactor;
|
||||
Visible:=true;
|
||||
end;
|
||||
ScaleLabel.Caption:=lisScalingFactor;
|
||||
PercentLabel.Caption:='%';
|
||||
|
||||
PercentEdit:=TEdit.Create(Self);
|
||||
with PercentEdit do begin
|
||||
Name:='PercentEdit';
|
||||
Parent:=Self;
|
||||
Left:=140;
|
||||
Top:=20;
|
||||
Width:=60;
|
||||
Text:='100';
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
PercentLabel:=TLabel.Create(Self);
|
||||
with PercentLabel do begin
|
||||
Name:='PercentLabel';
|
||||
Parent:=Self;
|
||||
Left:=PercentEdit.Left+PercentEdit.Width+5;
|
||||
Top:=ScaleLabel.Top;
|
||||
Width:=15;
|
||||
Height:=25;
|
||||
Caption:='%';
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
OkButton:=TButton.Create(Self);
|
||||
with OkButton do begin
|
||||
Name:='OkButton';
|
||||
Parent:=Self;
|
||||
Left:=85;
|
||||
Top:=Bevel.Top+Bevel.Height+10;
|
||||
Width:=75;
|
||||
Height:=25;
|
||||
Caption:=dlgButApply;
|
||||
OnClick:=@OkButtonClick;
|
||||
Visible:=true;
|
||||
end;
|
||||
|
||||
CancelButton:=TButton.Create(Self);
|
||||
with CancelButton do begin
|
||||
Name:='CancelButton';
|
||||
Parent:=Self;
|
||||
Left:=175;
|
||||
Top:=OkButton.Top;
|
||||
Width:=75;
|
||||
Height:=25;
|
||||
Caption:=dlgCancel;
|
||||
OnClick:=@CancelButtonClick;
|
||||
Visible:=true;
|
||||
end;
|
||||
end;
|
||||
OkButton.Caption:=dlgButApply;
|
||||
CancelButton.Caption:=dlgCancel;
|
||||
end;
|
||||
|
||||
procedure TScaleComponentsDialog.OkButtonClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=mrOk;
|
||||
end;
|
||||
|
||||
procedure TScaleComponentsDialog.CancelButtonClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult:=mrCancel;
|
||||
end;
|
||||
initialization
|
||||
{$I scalecompsdlg.lrs}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user