mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 17:27:32 +00:00
Add Spectrum gradient fill toggle in settings
Mirror the existing Wideband gradient fill option for the main spectrum: a "Spectrum gradient fill" checkbox on the Display settings tab gates the under-curve gradient in TSpectrumView.DrawSpectrum. The curve, grid, filter band and VFO markers always draw; only the gradient is optional. Persisted as spectrum_fill in settings JSON (default True, preserving current appearance). Wired through Settings -> SettingsForm visibility event -> MainForm -> TSpectrumView.FillSpectrum, same path as WidebandFill. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2a7bf8528a
commit
655d242d02
+16
-4
@@ -50,7 +50,7 @@ type
|
||||
TOnAudioInDevChange = procedure(DevIndex: Integer; const DevName: string) of object;
|
||||
TOnAudioBufferChange = procedure(BufferSize: Integer) of object;
|
||||
TOnVisibilityChange = procedure(ShowSpectrum, ShowWaterfall, ShowWideband,
|
||||
WidebandFill: Boolean) of object;
|
||||
WidebandFill, SpectrumFill: Boolean) of object;
|
||||
TOnFPSChange = procedure(FPS: Integer) of object;
|
||||
TOnThemeChange = procedure(LightTheme: Boolean) of object;
|
||||
TOnWfAGCNFChange = procedure(WfAGC, WfNF: Boolean) of object;
|
||||
@@ -123,6 +123,7 @@ type
|
||||
FChkShowWaterfall: TFlatCheckBox;
|
||||
FChkShowWideband: TFlatCheckBox;
|
||||
FChkWidebandFill: TFlatCheckBox;
|
||||
FChkSpectrumFill: TFlatCheckBox;
|
||||
FCmbFPS: TFlatComboBox;
|
||||
FChkLightTheme: TFlatCheckBox;
|
||||
FCmbFreqMhzDigits: TFlatComboBox;
|
||||
@@ -375,7 +376,7 @@ type
|
||||
procedure RefreshAudioDevices(AudioOut: TAudioOutput; AudioIn: TAudioInput);
|
||||
procedure LoadAudioBufferSize(BufferSize: Integer);
|
||||
procedure LoadVisibility(ShowSpectrum, ShowWaterfall, ShowWideband,
|
||||
WidebandFill: Boolean);
|
||||
WidebandFill, SpectrumFill: Boolean);
|
||||
procedure LoadFPS(FPS: Integer);
|
||||
procedure LoadLightTheme(ALight: Boolean);
|
||||
procedure LoadFreqMhzDigits(Digits: Integer);
|
||||
@@ -846,6 +847,16 @@ begin
|
||||
FChkWidebandFill.Font.Size := 9;
|
||||
FChkWidebandFill.OnChange := OnVisibilityChkChange;
|
||||
|
||||
FChkSpectrumFill := TFlatCheckBox.Create(Self);
|
||||
FChkSpectrumFill.Parent := Grp;
|
||||
FChkSpectrumFill.Caption := 'Spectrum gradient fill';
|
||||
FChkSpectrumFill.SetBounds(PAD, R1 + 28, CHKW, 22);
|
||||
FChkSpectrumFill.Checked := True;
|
||||
FChkSpectrumFill.Font.Color := CLR_TEXT;
|
||||
FChkSpectrumFill.Font.Name := UI_FONT;
|
||||
FChkSpectrumFill.Font.Size := 9;
|
||||
FChkSpectrumFill.OnChange := OnVisibilityChkChange;
|
||||
|
||||
Grp := MakeGroupPanel(FPageDisplay, 'Performance', MARGIN, 212, 650, 92);
|
||||
|
||||
MakeLbl(Grp, 'Refresh rate', PAD, R1 + 5, LW);
|
||||
@@ -2328,7 +2339,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TSettingsForm.LoadVisibility(ShowSpectrum, ShowWaterfall,
|
||||
ShowWideband, WidebandFill: Boolean);
|
||||
ShowWideband, WidebandFill, SpectrumFill: Boolean);
|
||||
begin
|
||||
FLoading := True;
|
||||
try
|
||||
@@ -2336,6 +2347,7 @@ begin
|
||||
FChkShowWaterfall.Checked := ShowWaterfall;
|
||||
FChkShowWideband.Checked := ShowWideband;
|
||||
FChkWidebandFill.Checked := WidebandFill;
|
||||
FChkSpectrumFill.Checked := SpectrumFill;
|
||||
finally
|
||||
FLoading := False;
|
||||
end;
|
||||
@@ -2357,7 +2369,7 @@ begin
|
||||
if FLoading then Exit;
|
||||
if not Assigned(FOnVisibilityChange) then Exit;
|
||||
FOnVisibilityChange(FChkShowSpectrum.Checked, FChkShowWaterfall.Checked,
|
||||
FChkShowWideband.Checked, FChkWidebandFill.Checked);
|
||||
FChkShowWideband.Checked, FChkWidebandFill.Checked, FChkSpectrumFill.Checked);
|
||||
end;
|
||||
|
||||
procedure TSettingsForm.OnLightThemeChkChange(Sender: TObject);
|
||||
|
||||
Reference in New Issue
Block a user