MessageComposer: Restrict minimal form width and height to keep correct layout. Patch by Don Siders, issue #40707.

This commit is contained in:
Maxim Ganetsky 2024-01-20 01:56:35 +03:00
parent 839c4e8307
commit e585a9016f

View File

@ -9,10 +9,11 @@ object FormMessagesComposer: TFormMessagesComposer
Caption = 'Messages Composer' Caption = 'Messages Composer'
ClientHeight = 539 ClientHeight = 539
ClientWidth = 580 ClientWidth = 580
Constraints.MinHeight = 500
Constraints.MinWidth = 520
Position = poScreenCenter
OnCreate = MessagesInitExecute OnCreate = MessagesInitExecute
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.1.0.0'
object CaptionLabel: TLabel object CaptionLabel: TLabel
AnchorSideLeft.Control = KindMessageComboBox AnchorSideLeft.Control = KindMessageComboBox
AnchorSideTop.Control = KindMessageComboBox AnchorSideTop.Control = KindMessageComboBox
@ -43,7 +44,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 152 Left = 152
Height = 15 Height = 15
Top = 64 Top = 64
Width = 42 Width = 44
Caption = 'DlgType' Caption = 'DlgType'
ParentColor = False ParentColor = False
end end
@ -54,7 +55,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8 Left = 8
Height = 15 Height = 15
Top = 281 Top = 281
Width = 70 Width = 69
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
Caption = 'Help Context' Caption = 'Help Context'
ParentColor = False ParentColor = False
@ -129,7 +130,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8 Left = 8
Height = 15 Height = 15
Top = 447 Top = 447
Width = 55 Width = 56
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Top = 12 BorderSpacing.Top = 12
Caption = 'Value (var)' Caption = 'Value (var)'
@ -320,7 +321,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8 Left = 8
Height = 23 Height = 23
Top = 412 Top = 412
Width = 181 Width = 183
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Top = 3 BorderSpacing.Top = 3
TabOrder = 7 TabOrder = 7
@ -331,10 +332,10 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = MsgMemo AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 205 Left = 207
Height = 19 Height = 19
Top = 414 Top = 414
Width = 76 Width = 74
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'MaskInput' Caption = 'MaskInput'
@ -391,13 +392,13 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8 Left = 8
Height = 19 Height = 19
Top = 8 Top = 8
Width = 69 Width = 67
BorderSpacing.Left = 8 BorderSpacing.Left = 8
Caption = 'if...then...' Caption = 'if...then...'
Checked = True Checked = True
OnClick = SetIfOrCaseExecute
TabOrder = 0 TabOrder = 0
TabStop = True TabStop = True
OnClick = SetIfOrCaseExecute
end end
object IfThenElseRadioButton: TRadioButton object IfThenElseRadioButton: TRadioButton
AnchorSideLeft.Control = IfThenRadioButton AnchorSideLeft.Control = IfThenRadioButton
@ -406,38 +407,38 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8 Left = 8
Height = 19 Height = 19
Top = 29 Top = 29
Width = 101 Width = 99
BorderSpacing.Top = 2 BorderSpacing.Top = 2
Caption = 'if...then...else ...' Caption = 'if...then...else ...'
OnClick = SetIfOrCaseExecute
TabOrder = 1 TabOrder = 1
OnClick = SetIfOrCaseExecute
end end
object CaseOfEndRadioButton: TRadioButton object CaseOfEndRadioButton: TRadioButton
AnchorSideLeft.Control = IfThenElseRadioButton AnchorSideLeft.Control = IfThenElseRadioButton
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = IfThenRadioButton AnchorSideTop.Control = IfThenRadioButton
Left = 125 Left = 123
Height = 19 Height = 19
Top = 10 Top = 10
Width = 107 Width = 105
BorderSpacing.Left = 16 BorderSpacing.Left = 16
BorderSpacing.Top = 2 BorderSpacing.Top = 2
Caption = 'case ... of ... end;' Caption = 'case ... of ... end;'
OnClick = SetIfOrCaseExecute
TabOrder = 2 TabOrder = 2
OnClick = SetIfOrCaseExecute
end end
object CaseOfEndElseRadioButton: TRadioButton object CaseOfEndElseRadioButton: TRadioButton
AnchorSideLeft.Control = CaseOfEndRadioButton AnchorSideLeft.Control = CaseOfEndRadioButton
AnchorSideTop.Control = CaseOfEndRadioButton AnchorSideTop.Control = CaseOfEndRadioButton
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 125 Left = 123
Height = 19 Height = 19
Top = 31 Top = 31
Width = 116 Width = 114
BorderSpacing.Top = 2 BorderSpacing.Top = 2
Caption = 'case ... of ... else ...' Caption = 'case ... of ... else ...'
OnClick = SetIfOrCaseExecute
TabOrder = 3 TabOrder = 3
OnClick = SetIfOrCaseExecute
end end
object BeginEndCheckBox: TCheckBox object BeginEndCheckBox: TCheckBox
AnchorSideLeft.Control = IfThenRadioButton AnchorSideLeft.Control = IfThenRadioButton
@ -446,7 +447,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8 Left = 8
Height = 19 Height = 19
Top = 54 Top = 54
Width = 85 Width = 83
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'begin ... end' Caption = 'begin ... end'
TabOrder = 4 TabOrder = 4
@ -476,7 +477,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 0 Left = 0
Height = 15 Height = 15
Top = 0 Top = 0
Width = 58 Width = 60
Caption = '"if" RESULT' Caption = '"if" RESULT'
ParentColor = False ParentColor = False
end end
@ -587,9 +588,9 @@ object FormMessagesComposer: TFormMessagesComposer
Items.Strings = ( Items.Strings = (
'{Filled @runtime}' '{Filled @runtime}'
) )
OnChange = MessageSetupExecute
Style = csDropDownList Style = csDropDownList
TabOrder = 14 TabOrder = 14
OnChange = MessageSetupExecute
end end
object MsgMemo: TMemo object MsgMemo: TMemo
AnchorSideLeft.Control = MsgLabel AnchorSideLeft.Control = MsgLabel
@ -607,11 +608,11 @@ object FormMessagesComposer: TFormMessagesComposer
Lines.Strings = ( Lines.Strings = (
'MsgLabel' 'MsgLabel'
) )
OnChange = GetParamsFmtExecute
OnEditingDone = GetParamsFmtExecute
ScrollBars = ssAutoVertical ScrollBars = ssAutoVertical
TabOrder = 11 TabOrder = 11
WordWrap = False WordWrap = False
OnChange = GetParamsFmtExecute
OnEditingDone = GetParamsFmtExecute
end end
object ButtonsNotebook: TNotebook object ButtonsNotebook: TNotebook
AnchorSideLeft.Control = HCenterBevel AnchorSideLeft.Control = HCenterBevel
@ -663,8 +664,8 @@ object FormMessagesComposer: TFormMessagesComposer
'mbHelp' 'mbHelp'
'mbClose' 'mbClose'
) )
OnItemClick = ButtonsCheckGroupItemClick
TabOrder = 0 TabOrder = 0
OnItemClick = ButtonsCheckGroupItemClick
Data = { Data = {
0C000000020203030202020202020202 0C000000020203030202020202020202
} }
@ -804,7 +805,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8 Left = 8
Height = 26 Height = 26
Top = 9 Top = 9
Width = 55 Width = 56
Action = Test Action = Test
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
AutoSize = True AutoSize = True
@ -882,8 +883,8 @@ object FormMessagesComposer: TFormMessagesComposer
Shape = bsSpacer Shape = bsSpacer
end end
object ActionList1: TActionList object ActionList1: TActionList
left = 504 Left = 504
top = 376 Top = 376
object AddConst: TAction object AddConst: TAction
Caption = 'AddConst' Caption = 'AddConst'
OnExecute = AddConstExecute OnExecute = AddConstExecute