diff --git a/source/forms/hxsettingsdlg.lfm b/source/forms/hxsettingsdlg.lfm index 21918dd..5002ea4 100644 --- a/source/forms/hxsettingsdlg.lfm +++ b/source/forms/hxsettingsdlg.lfm @@ -48,10 +48,10 @@ object SettingsForm: TSettingsForm Height = 444 Top = 6 Width = 767 - ActivePage = pgEditor + ActivePage = pgFormat Align = alClient BorderSpacing.Around = 6 - TabIndex = 0 + TabIndex = 1 TabOrder = 1 OnChange = PageControlChange OnChanging = PageControlChanging @@ -335,6 +335,7 @@ object SettingsForm: TSettingsForm Top = 26 Width = 152 BorderSpacing.Left = 40 + BorderSpacing.Right = 16 Caption = 'Lowercase hex characters' TabOrder = 6 OnChange = FormatChanged diff --git a/source/forms/hxsettingsdlg.pas b/source/forms/hxsettingsdlg.pas index bc6e119..d3a191a 100644 --- a/source/forms/hxsettingsdlg.pas +++ b/source/forms/hxsettingsdlg.pas @@ -114,6 +114,7 @@ TSettingsForm = class(TForm) private FDataTypeCheckBoxes : array[dtFirstNumericDataType..dtLastNumericDataType] of TCheckbox; FSampleHexEditor: THxHexEditor; + FActivated: Boolean; procedure ApplyParamsToHexEditor(const AParams: THexParams); procedure DrawIcons(APaintbox: TPaintbox; AImages: TImageList); procedure PrepareSampleHexEditor; @@ -212,7 +213,12 @@ procedure TSettingsForm.ColorChanged(Sender: TObject); procedure TSettingsForm.FormActivate(Sender: TObject); begin - Constraints.MinWidth := cbHexLowerCase.left + cbHexLowercase.Width + 16 + PageControl.BorderSpacing.Around * 2; + if not FActivated then + begin + FActivated := true; + Constraints.MinWidth := cbHexLowerCase.left + cbHexLowercase.Width + + cbHexLowercase.BorderSpacing.Right + PageControl.BorderSpacing.Around * 2; + end; end; procedure TSettingsForm.ColorsFromControls(var AParams: TColorParams); @@ -348,6 +354,10 @@ procedure TSettingsForm.PageControlChange(Sender: TObject); gbSampleHexEditor.Parent := PageControl.ActivePage; gbSampleHexEditor.AnchorSideLeft.Control := PageControl.ActivePage; gbSampleHexEditor.AnchorSideRight.Control := PageControl.ActivePage; + if PageControl.ActivePage = pgColors then + gbSampleHexEditor.AnchorSideTop.Control := clbCharfieldForeground + else + gbSampleHexEditor.AnchorSideTop.Control := cmbRulerNumberBase; end; end; @@ -356,6 +366,7 @@ procedure TSettingsForm.PageControlChanging(Sender: TObject; begin gbSampleHexEditor.AnchorSideLeft.Control := nil; gbSampleHexEditor.AnchorSideRight.Control := nil; + gbSampleHexEditor.AnchorSideTop.Control := nil; end; procedure TSettingsForm.ParamsFromControls(var AParams: THexParams); diff --git a/source/units/hxglobal.pas b/source/units/hxglobal.pas index 477c512..1550b1f 100644 --- a/source/units/hxglobal.pas +++ b/source/units/hxglobal.pas @@ -211,6 +211,8 @@ TColorParams = record const // Repeating the clXXXX values to keep Graphics out of this unit clWindow = TGraphicsColor($80000005); clWindowText = TGraphicsColor($80000008); + clHighlight = TGraphicsColor($8000000D); + clHighlightText = TGraphicsColor($8000000E); clBtnFace = TGraphicsColor($8000000F); clBtnShadow = TGraphicsColor($80000010); clBtnHighlight = TGraphicsColor($80000014); @@ -270,8 +272,8 @@ TColorParams = record ActiveFieldBackgroundColor: clWindow; OffsetBackgroundColor: clBtnFace; OffsetForegroundColor: clWindowText; - CurrentOffsetBackgroundColor: clBtnShadow; - CurrentOffsetForegroundColor: clBtnHighlight; + CurrentOffsetBackgroundColor: clHighlight; //BtnShadow; + CurrentOffsetForegroundColor: clHighlightText; //clBtnHighlight; EvenColumnForegroundColor: clNavy; OddColumnForegroundColor: clBlue; ChangedBackgroundColor: $00A8FFFF; @@ -282,8 +284,8 @@ TColorParams = record ActiveFieldBackgroundColor: clWindow; OffsetBackgroundColor: clBtnFace; OffsetForegroundColor: clWindowText; - CurrentOffsetBackgroundColor: clBtnShadow; - CurrentOffsetForegroundColor: clBtnHighlight; + CurrentOffsetBackgroundColor: clHighlight; //clBtnShadow; + CurrentOffsetForegroundColor: clHighlightText; //clBtnHighlight; EvenColumnForegroundColor: clOlive; OddColumnForegroundColor: clYellow; ChangedBackgroundColor: $00A8FFFF;