IdeDebugger: display format, improve layout for array and options. Fix calculating min-constraints

This commit is contained in:
Martin 2024-09-26 18:51:40 +02:00
parent f613a7acf6
commit 4ed0529400
2 changed files with 16 additions and 3 deletions

View File

@ -597,6 +597,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 21 Top = 21
Width = 89 Width = 89
Caption = 'lbNumSepGroup' Caption = 'lbNumSepGroup'
Constraints.MinWidth = 1
end end
object PanelNumSepGroup: TPanel object PanelNumSepGroup: TPanel
AnchorSideLeft.Control = lbNumSepGroup AnchorSideLeft.Control = lbNumSepGroup
@ -629,6 +630,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Width = 54 Width = 54
Caption = 'rbNumSepNone' Caption = 'rbNumSepNone'
Checked = True Checked = True
Constraints.MinWidth = 1
TabOrder = 0 TabOrder = 0
TabStop = True TabStop = True
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
@ -639,6 +641,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 0 Top = 0
Width = 50 Width = 50
Caption = 'rbNumSepByte' Caption = 'rbNumSepByte'
Constraints.MinWidth = 1
TabOrder = 1 TabOrder = 1
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
end end
@ -648,6 +651,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 0 Top = 0
Width = 54 Width = 54
Caption = 'rbNumSepWord' Caption = 'rbNumSepWord'
Constraints.MinWidth = 1
TabOrder = 2 TabOrder = 2
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
end end
@ -657,6 +661,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 0 Top = 0
Width = 53 Width = 53
Caption = 'rbNumSepLong' Caption = 'rbNumSepLong'
Constraints.MinWidth = 1
TabOrder = 3 TabOrder = 3
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
end end
@ -1138,6 +1143,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 21 Top = 21
Width = 62 Width = 62
Caption = 'lbSepGroup' Caption = 'lbSepGroup'
Constraints.MinWidth = 1
end end
object PanelNum2SepGroup: TPanel object PanelNum2SepGroup: TPanel
AnchorSideLeft.Control = lbNum2SepGroup AnchorSideLeft.Control = lbNum2SepGroup
@ -1169,6 +1175,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Width = 62 Width = 62
Caption = 'rbNumSepNone' Caption = 'rbNumSepNone'
Checked = True Checked = True
Constraints.MinWidth = 1
TabOrder = 0 TabOrder = 0
TabStop = True TabStop = True
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
@ -1179,6 +1186,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 0 Top = 0
Width = 58 Width = 58
Caption = 'rbNumSepByte' Caption = 'rbNumSepByte'
Constraints.MinWidth = 1
TabOrder = 1 TabOrder = 1
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
end end
@ -1188,6 +1196,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 0 Top = 0
Width = 62 Width = 62
Caption = 'rbNumSepWord' Caption = 'rbNumSepWord'
Constraints.MinWidth = 1
TabOrder = 2 TabOrder = 2
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
end end
@ -1197,6 +1206,7 @@ object DisplayFormatFrame: TDisplayFormatFrame
Top = 0 Top = 0
Width = 60 Width = 60
Caption = 'rbNumSepLong' Caption = 'rbNumSepLong'
Constraints.MinWidth = 1
TabOrder = 3 TabOrder = 3
OnChange = FormatNumGroupChanged OnChange = FormatNumGroupChanged
end end

View File

@ -1328,8 +1328,6 @@ begin
lbOverrideAddressFormat.Caption := {DispFormatDlgBtnAdrFormat+ ': ' +} DispFormatDlgBtnStruct + ', ' + DispFormatDlgBtnPointer lbOverrideAddressFormat.Caption := {DispFormatDlgBtnAdrFormat+ ': ' +} DispFormatDlgBtnStruct + ', ' + DispFormatDlgBtnPointer
else else
lbOverrideAddressFormat.Caption := DispFormatDlgBtnAdrFormat; lbOverrideAddressFormat.Caption := DispFormatDlgBtnAdrFormat;
UpdateConstraints;
end; end;
procedure TDisplayFormatFrame.UpdateNumDigitPanel; procedure TDisplayFormatFrame.UpdateNumDigitPanel;
@ -1715,13 +1713,17 @@ begin
if (not (Components[i] is TControl)) then if (not (Components[i] is TControl)) then
Continue; Continue;
c := TControl(Components[i]); c := TControl(Components[i]);
if (Trim(c.Caption) = '') or if (not ((c is TCheckBox) or (c is TRadioButton) or (c is TLabel) or (c is TCustomEdit))) or
(Trim(c.Caption) = '') or
(not c.IsVisible) or (not c.IsVisible) or
(c.Constraints.MinWidth > 0) or (c.Constraints.MinWidth > 0) or
((c is TLabel) and (TLabel(c).WordWrap)) ((c is TLabel) and (TLabel(c).WordWrap))
then then
Continue; Continue;
px := 0;
py := 0;
c.InvalidatePreferredSize;
c.GetPreferredSize(px, py); c.GetPreferredSize(px, py);
if (px > c.Constraints.MinWidth) and if (px > c.Constraints.MinWidth) and
((c.Constraints.MaxWidth = 0) or (px < c.Constraints.MaxWidth)) ((c.Constraints.MaxWidth = 0) or (px < c.Constraints.MaxWidth))
@ -2221,6 +2223,7 @@ begin
cbMemDump.State := BoolsetToCBState(FormatIsMemDump, False); cbMemDump.State := BoolsetToCBState(FormatIsMemDump, False);
UpdateConstraints;
finally finally
EnableAutoSizing; EnableAutoSizing;