tvplanit: Fix ChangeBounds loop in Element editor for Laz 1.4.4

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5057 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-07-31 21:58:26 +00:00
parent 710725dd66
commit 1c5826f182
2 changed files with 166 additions and 157 deletions

View File

@@ -1,7 +1,7 @@
object frmEditElement: TfrmEditElement object frmEditElement: TfrmEditElement
Left = 691 Left = 954
Height = 503 Height = 503
Top = 226 Top = 231
Width = 489 Width = 489
HorzScrollBar.Page = 378 HorzScrollBar.Page = 378
VertScrollBar.Page = 444 VertScrollBar.Page = 444
@@ -12,10 +12,10 @@ object frmEditElement: TfrmEditElement
OnCreate = FormCreate OnCreate = FormCreate
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.7' LCLVersion = '1.4.4.0'
object gbVisual: TGroupBox object gbVisual: TGroupBox
Left = 12 Left = 12
Height = 148 Height = 152
Top = 181 Top = 181
Width = 465 Width = 465
Align = alTop Align = alTop
@@ -24,57 +24,18 @@ object frmEditElement: TfrmEditElement
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 12 BorderSpacing.Right = 12
Caption = ' Visual ' Caption = ' Visual '
ClientHeight = 128 ClientHeight = 132
ClientWidth = 461 ClientWidth = 461
TabOrder = 0 TabOrder = 0
object LblTop: TLabel
Left = 224
Height = 15
Top = 20
Width = 23
Caption = 'Top:'
FocusControl = edTop
ParentColor = False
end
object LblLeft: TLabel
Left = 224
Height = 15
Top = 48
Width = 23
Caption = 'Left:'
FocusControl = edLeft
ParentColor = False
end
object LblHeight: TLabel
Left = 352
Height = 15
Top = 20
Width = 39
BorderSpacing.Right = 4
Caption = 'Height:'
FocusControl = edHeight
ParentColor = False
end
object LblWidth: TLabel
Left = 357
Height = 15
Top = 48
Width = 35
BorderSpacing.Right = 4
Caption = 'Width:'
FocusControl = edWidth
ParentColor = False
end
object rgMeasurement: TRadioGroup object rgMeasurement: TRadioGroup
AnchorSideLeft.Control = rgRotation Left = 104
AnchorSideLeft.Side = asrBottom Height = 124
Left = 103
Height = 108
Top = 0 Top = 0
Width = 98 Width = 98
Align = alLeft
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
BorderSpacing.Left = 7 BorderSpacing.Left = 8
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
Caption = ' Measurement ' Caption = ' Measurement '
ChildSizing.LeftRightSpacing = 6 ChildSizing.LeftRightSpacing = 6
@@ -85,7 +46,7 @@ object frmEditElement: TfrmEditElement
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 88 ClientHeight = 104
ClientWidth = 94 ClientWidth = 94
ItemIndex = 1 ItemIndex = 1
Items.Strings = ( Items.Strings = (
@@ -98,13 +59,11 @@ object frmEditElement: TfrmEditElement
TabOrder = 1 TabOrder = 1
end end
object rgRotation: TRadioGroup object rgRotation: TRadioGroup
AnchorSideTop.Control = rgMeasurement
AnchorSideBottom.Control = rgMeasurement
AnchorSideBottom.Side = asrBottom
Left = 8 Left = 8
Height = 120 Height = 124
Top = 0 Top = 0
Width = 88 Width = 88
Align = alLeft
AutoFill = True AutoFill = True
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
@@ -118,7 +77,7 @@ object frmEditElement: TfrmEditElement
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 100 ClientHeight = 104
ClientWidth = 84 ClientWidth = 84
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
@@ -129,70 +88,112 @@ object frmEditElement: TfrmEditElement
) )
TabOrder = 0 TabOrder = 0
end end
object Panel3: TPanel
Left = 202
Height = 132
Top = 0
Width = 239
Align = alLeft
BevelOuter = bvNone
ClientHeight = 132
ClientWidth = 239
TabOrder = 2
object LblTop: TLabel
Left = 8
Height = 15
Top = 28
Width = 23
Caption = 'Top:'
FocusControl = edTop
ParentColor = False
end
object LblHeight: TLabel
Left = 136
Height = 15
Top = 28
Width = 39
BorderSpacing.Right = 4
Caption = 'Height:'
FocusControl = edHeight
ParentColor = False
end
object edTop: TEdit object edTop: TEdit
Left = 260 Left = 44
Height = 23 Height = 23
Top = 16 Top = 24
Width = 48 Width = 48
OnEnter = PosEditEnter OnEnter = PosEditEnter
OnExit = PosEditExit OnExit = PosEditExit
TabOrder = 2 TabOrder = 0
Text = '0.00' Text = '0.00'
end end
object edLeft: TEdit object edHeight: TEdit
Left = 260 Left = 183
Height = 23 Height = 23
Top = 44 Top = 24
Width = 40
OnEnter = PosEditEnter
OnExit = PosEditExit
TabOrder = 1
Text = '0.00'
end
object udHeight: TUpDown
AnchorSideRight.Side = asrBottom
Left = 223
Height = 23
Top = 24
Width = 12
Associate = edHeight
BorderSpacing.Right = 8
Min = 0
OnClick = UpDownClick
Position = 0
TabOrder = 2
Wrap = False
end
object LblLeft: TLabel
Left = 8
Height = 15
Top = 60
Width = 23
Caption = 'Left:'
FocusControl = edLeft
ParentColor = False
end
object LblWidth: TLabel
Left = 141
Height = 15
Top = 60
Width = 35
BorderSpacing.Right = 4
Caption = 'Width:'
FocusControl = edWidth
ParentColor = False
end
object edLeft: TEdit
Left = 44
Height = 23
Top = 56
Width = 48 Width = 48
OnEnter = PosEditEnter OnEnter = PosEditEnter
OnExit = PosEditExit OnExit = PosEditExit
TabOrder = 3
Text = '0.00'
end
object edWidth: TEdit
Left = 183
Height = 23
Top = 56
Width = 40
OnEnter = PosEditEnter
OnExit = PosEditExit
TabOrder = 4 TabOrder = 4
Text = '0.00' Text = '0.00'
end end
object edHeight: TEdit
Left = 399
Height = 23
Top = 16
Width = 40
OnEnter = PosEditEnter
OnExit = PosEditExit
TabOrder = 6
Text = '0.00'
end
object edWidth: TEdit
Left = 399
Height = 23
Top = 44
Width = 40
OnEnter = PosEditEnter
OnExit = PosEditExit
TabOrder = 8
Text = '0.00'
end
object chkVisible: TCheckBox
Left = 260
Height = 19
Top = 80
Width = 54
Caption = 'Visible'
TabOrder = 10
end
object udTop: TUpDown
Left = 308
Height = 23
Top = 16
Width = 12
Associate = edTop
Min = 0
OnClick = UpDownClick
Position = 0
TabOrder = 3
Wrap = False
end
object udLeft: TUpDown object udLeft: TUpDown
Left = 308 Left = 92
Height = 23 Height = 23
Top = 44 Top = 56
Width = 12 Width = 12
Associate = edLeft Associate = edLeft
Min = 0 Min = 0
@@ -201,39 +202,46 @@ object frmEditElement: TfrmEditElement
TabOrder = 5 TabOrder = 5
Wrap = False Wrap = False
end end
object udHeight: TUpDown
AnchorSideRight.Side = asrBottom
Left = 439
Height = 23
Top = 16
Width = 12
Associate = edHeight
BorderSpacing.Right = 8
Min = 0
OnClick = UpDownClick
Position = 0
TabOrder = 7
Wrap = False
end
object udWidth: TUpDown object udWidth: TUpDown
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 439 Left = 223
Height = 23 Height = 23
Top = 44 Top = 56
Width = 12 Width = 12
Associate = edWidth Associate = edWidth
BorderSpacing.Right = 8 BorderSpacing.Right = 8
Min = 0 Min = 0
OnClick = UpDownClick OnClick = UpDownClick
Position = 0 Position = 0
TabOrder = 9 TabOrder = 6
Wrap = False Wrap = False
end end
object chkVisible: TCheckBox
Left = 48
Height = 19
Top = 88
Width = 54
Caption = 'Visible'
TabOrder = 7
end
object udTop: TUpDown
Left = 92
Height = 23
Top = 24
Width = 12
Associate = edTop
Min = 0
OnClick = UpDownClick
Position = 0
TabOrder = 8
Wrap = False
end
end
end end
object gbCaption: TGroupBox object gbCaption: TGroupBox
Left = 12 Left = 12
Height = 54 Height = 54
Top = 337 Top = 341
Width = 465 Width = 465
Align = alTop Align = alTop
AutoSize = True AutoSize = True
@@ -412,7 +420,7 @@ object frmEditElement: TfrmEditElement
object ButtonPanel: TPanel object ButtonPanel: TPanel
Left = 12 Left = 12
Height = 25 Height = 25
Top = 399 Top = 403
Width = 465 Width = 465
Align = alTop Align = alTop
AutoSize = True AutoSize = True

View File

@@ -57,6 +57,7 @@ type
Panel2: TPanel; Panel2: TPanel;
ButtonPanel: TPanel; ButtonPanel: TPanel;
ItemTypePanel: TPanel; ItemTypePanel: TPanel;
Panel3: TPanel;
rgDayOffsetUnit: TRadioGroup; rgDayOffsetUnit: TRadioGroup;
rgItemType: TRadioGroup; rgItemType: TRadioGroup;
gbVisual: TGroupBox; gbVisual: TGroupBox;
@@ -341,7 +342,7 @@ begin
// Position Left/Top etc controls // Position Left/Top etc controls
w := Max(GetLabelWidth(lblLeft), GetLabelWidth(lblTop)); w := Max(GetLabelWidth(lblLeft), GetLabelWidth(lblTop));
edTop.Left := RightOf(rgMeasurement) + 2*DELTA + w + DELTA; edTop.Left := 2*DELTA + w + DELTA;
udTop.Left := RightOf(edTop); udTop.Left := RightOf(edTop);
lblTop.Left := edTop.Left - DELTA - GetLabelWidth(lblTop); lblTop.Left := edTop.Left - DELTA - GetLabelWidth(lblTop);
edLeft.Left := edTop.Left; edLeft.Left := edTop.Left;
@@ -349,14 +350,14 @@ begin
lblLeft.Left := edLeft.Left - DELTA - GetLabelWidth(lblLeft); lblLeft.Left := edLeft.Left - DELTA - GetLabelWidth(lblLeft);
w := Max(GetLabelWidth(lblWidth), GetLabelWidth(lblHeight)); w := Max(GetLabelWidth(lblWidth), GetLabelWidth(lblHeight));
edHeight.Left := RightOf(edTop) + 2*DELTA + w + DELTA; edHeight.Left := RightOf(edTop) + 3*DELTA + w + DELTA;
edWidth.Left := edHeight.Left; edWidth.Left := edHeight.Left;
udHeight.Left := RightOf(edHeight); udHeight.Left := RightOf(edHeight);
udWidth.Left := RightOf(edWidth); udWidth.Left := RightOf(edWidth);
lblHeight.Left := edHeight.Left - DELTA - GetLabelWidth(lblHeight); lblHeight.Left := edHeight.Left - DELTA - GetLabelWidth(lblHeight);
lblWidth.Left := edWidth.Left - DELTA - GetLabelWidth(lblWidth); lblWidth.Left := edWidth.Left - DELTA - GetLabelWidth(lblWidth);
chkVisible.Left := edTop.Left; chkVisible.Left := edTop.Left;
Panel3.Width := RightOf(udHeight) + 2*DELTA;
// Buttons at the bottom // Buttons at the bottom
w := Max(GetButtonWidth(btnOK), GetButtonWidth(btnCancel)); w := Max(GetButtonWidth(btnOK), GetButtonWidth(btnCancel));